GroupBy#

This namespace comes available by calling LazyFrame.groupby(..).

LazyGroupBy.agg(aggs)

Describe the aggregation that need to be done on a group.

LazyGroupBy.apply(f, schema)

Apply a custom/user-defined function (UDF) over the groups as a new DataFrame.

LazyGroupBy.head([n])

Get the first n rows of each group.

LazyGroupBy.tail([n])

Get the last n rows of each group.