snowflake.snowpark.DataFrame.pivot¶
- DataFrame.pivot(pivot_col: ColumnOrName, values: Iterable[LiteralType]) RelationalGroupedDataFrame[source]¶
Rotates this DataFrame by turning the unique values from one column in the input expression into multiple columns and aggregating results where required on any remaining column values.
Only one aggregate is supported with pivot.
Example:
- Parameters:
pivot_col – The column or name of the column to use.
values – A list of values in the column.