dfr var
for expression
Create a var expression for an aggregation
Signature
> dfr var
Examples
Var aggregation for a group-by
> [[a b]; [one 2] [one 2] [two 1] [two 1]]
| dfr into-df
| dfr group-by a
| dfr agg (dfr col b | dfr var)
╭───┬─────┬────────╮
│ # │ a │ b │
├───┼─────┼────────┤
│ 0 │ one │ 0.0000 │
│ 1 │ two │ 0.0000 │
╰───┴─────┴────────╯
dfr var
for lazyframe
Aggregates columns to their var value
Signature
> dfr var
Examples
Var value from columns in a dataframe
> [[a b]; [6 2] [4 2] [2 2]] | dfr into-df | dfr var
╭───┬────────┬────────╮
│ # │ a │ b │
├───┼────────┼────────┤
│ 0 │ 4.0000 │ 0.0000 │
╰───┴────────┴────────╯