diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index 9f0c9b39b8d5..9af5858ab8b4 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -6379,8 +6379,14 @@ def pivot( columns Name of the column(s) whose values will be used as the header of the output DataFrame. - aggregate_function : {'first', 'sum', 'max', 'min', 'mean', 'median', 'last', 'count'} - A predefined aggregate function str or an expression. + aggregate_function + Choose from: + + - None: no aggregation takes place, will raise error if multiple values are in group. + - A predefined aggregate function string, one of + {'first', 'sum', 'max', 'min', 'mean', 'median', 'last', 'count'} + - An expression to do the aggregation. + maintain_order Sort the grouped keys so that the output order is predictable. sort_columns