hipdf.pivot_table#
21 min read time
Applies to Linux
- hipdf.pivot_table(data, values=None, index=None, columns=None, aggfunc='mean', fill_value=None, margins=False, dropna=None, margins_name='All', observed=False, sort=True)#
Create a spreadsheet-style pivot table as a DataFrame.
Parameters#
data : DataFrame values : column name or list of column names to aggregate, optional index : list of column names
Values to group by in the rows.
- columnslist of column names
Values to group by in the columns.
- aggfuncstr or dict, default “mean”
If dict is passed, the key is column to aggregate and value is function name.
- fill_valuescalar, default None
Value to replace missing values with (in the resulting pivot table, after aggregation).
margins : Not supported dropna : Not supported margins_name : Not supported observed : Not supported sort : Not supported
Returns#
- DataFrame
An Excel style pivot table.