DataFrame.pivot

DataFrame pivot(string[] index, string on, string[] values, PivotAgg agg = PivotAgg.NONE)

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

indexthe row-key columns (empty: one aggregate row)
onthe column whose distinct values become columns
valuesthe cell columns (one or more)
aggthe duplicate-cell policy

Returns

the pivoted frame.

Throws

DataFrameException for absent columns, no value

columns, duplicate cells under NONE, or generated name collisions.