dask.dataframe.DataFrame.pivot_table

dask.dataframe.DataFrame.pivot_table#

DataFrame.pivot_table(index, columns, values, aggfunc='mean')[source]#

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:
valuesscalar

column to aggregate

indexscalar

column to be index

columnsscalar

column to be columns

aggfunc{‘mean’, ‘sum’, ‘count’}, default ‘mean’
Returns:
tableDataFrame