MCPcopy Create free account
hub / github.com/dask/dask / pivot_table

Method pivot_table

dask/dataframe/dask_expr/_collection.py:3724–3744  ·  view source on GitHub ↗

Create a spreadsheet-style pivot table as a DataFrame. Target ``columns`` must have category dtype to infer result's ``columns``. ``index``, ``columns``, ``values`` and ``aggfunc`` must be all scalar. Parameters ---------- values : scalar

(self, index, columns, values, aggfunc="mean")

Source from the content-addressed store, hash-verified

3722 raise ValueError("axis must be either 0, 1, 'index', 'columns', or None")
3723
3724 def pivot_table(self, index, columns, values, aggfunc="mean"):
3725 """
3726 Create a spreadsheet-style pivot table as a DataFrame. Target ``columns``
3727 must have category dtype to infer result's ``columns``.
3728 ``index``, ``columns``, ``values`` and ``aggfunc`` must be all scalar.
3729
3730 Parameters
3731 ----------
3732 values : scalar
3733 column to aggregate
3734 index : scalar
3735 column to be index
3736 columns : scalar
3737 column to be columns
3738 aggfunc : {'mean', 'sum', 'count'}, default 'mean'
3739
3740 Returns
3741 -------
3742 table : DataFrame
3743 """
3744 return pivot_table(self, index, columns, values, aggfunc)
3745
3746 @property
3747 def iloc(self):

Callers 11

test_pivot_tableFunction · 0.95
pivot_sumFunction · 0.80
pivot_countFunction · 0.80
pivot_firstFunction · 0.80
pivot_lastFunction · 0.80
test_pivot_tableFunction · 0.80
test_pivot_table_failsFunction · 0.80
test_pivot_table_dtypeFunction · 0.80
test_pivot_table_errorsFunction · 0.80

Calls 1

pivot_tableFunction · 0.85

Tested by 7

test_pivot_tableFunction · 0.76
test_pivot_tableFunction · 0.64
test_pivot_table_failsFunction · 0.64
test_pivot_table_dtypeFunction · 0.64
test_pivot_table_errorsFunction · 0.64