Skip to content

LazyGroupBy_ungroup

Source code

Description

Revert the group by operation.

Usage

<LazyGroupBy>$ungroup()

Value

A new LazyFrame object.

Examples

library("polars")

lf = as_polars_lf(mtcars)
lf
#> polars LazyFrame
#>  $explain(): Show the optimized query plan.
#> 
#> Naive plan:
#> DF ["mpg", "cyl", "disp", "hp"]; PROJECT */11 COLUMNS; SELECTION: None
lgb = lf$group_by("cyl")
lgb
#> polars LazyGroupBy: 
#> LazyGroupBy (internals are opaque)
lgb$ungroup()
#> polars LazyFrame
#>  $explain(): Show the optimized query plan.
#> 
#> Naive plan:
#> DF ["mpg", "cyl", "disp", "hp"]; PROJECT */11 COLUMNS; SELECTION: None