DataFrame.pivot
Pivots the frame wide: the distinct values of on become columns, the distinct index tuples become rows, and the cells hold the values aggregated per (index tuple, on value) - first-appearance order everywhere, duplicate cells error under the default NONE, missing cells take the aggregate's empty-set value (ADR-2026-10-24-20; the full contract lives on ddn.df.reshape.pivot). Eager-only: lazy users collect() first.
Parameters
index | the row-key columns (empty: one aggregate row) |
on | the column whose distinct values become columns |
values | the cell columns (one or more) |
agg | the duplicate-cell policy |
Returns
the pivoted frame.
Throws
DataFrameException for absent columns, no value
columns, duplicate cells under NONE, or generated name collisions.