# dask.dataframe.reshape.pivot_table

dask.dataframe.reshape.pivot_table(df, index=None, columns=None, values=None, aggfunc='mean')

  Create a spreadsheet-style pivot table as a DataFrame. Target `columns` must have category dtype to infer result’s `columns`. `index`, `columns`, and `aggfunc` must be all scalar. `values` can be scalar or list-like.

  Parameters:
    df DataFrame
    index scalar

      column to be index

    columns scalar

      column to be columns

    values scalar or list(scalar)

      column(s) to aggregate

    aggfunc{‘mean’, ‘sum’, ‘count’, ‘first’, ‘last’}, default ‘mean’
  Returns:
    table DataFrame

  See also

  `pandas.DataFrame.pivot_table`