updateGroups

abstract fun <R> updateGroups(transform: Selector<DataFrame<G>, DataFrame<R>>): GroupBy<T, R>

Creates a new GroupBy by transforming each group’s DataFrame using the provided transform function.

Check out GroupBy grammar.

For more information: See "GroupBy Transformation" on the documentation website.

NOTE: This operation removes key-column status from each column in the group. In other words, each column in the group is treated as a new column, and not omitted when .values() or other aggregations are called.

For more information: See "GroupBy Transformation" on the documentation website.

Return

A new GroupBy instance containing the transformed groups.

Parameters

transform

A lambda that takes each group as a DataFrame (available both as a receiver and as a parameter) and returns a transformed DataFrame.