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

Method pivot_table

dask/dataframe/dask_expr/_collection.py:3694–3714  ·  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

3692 raise ValueError("axis must be either 0, 1, 'index', 'columns', or None")
3693
3694 def pivot_table(self, index, columns, values, aggfunc="mean"):
3695 """
3696 Create a spreadsheet-style pivot table as a DataFrame. Target ``columns``
3697 must have category dtype to infer result's ``columns``.
3698 ``index``, ``columns``, ``values`` and ``aggfunc`` must be all scalar.
3699
3700 Parameters
3701 ----------
3702 values : scalar
3703 column to aggregate
3704 index : scalar
3705 column to be index
3706 columns : scalar
3707 column to be columns
3708 aggfunc : {'mean', 'sum', 'count'}, default 'mean'
3709
3710 Returns
3711 -------
3712 table : DataFrame
3713 """
3714 return pivot_table(self, index, columns, values, aggfunc)
3715
3716 @property
3717 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