polars std for expression

Creates a std expression for an aggregation of std value from columns in a dataframe.

Signature

> polars std {flags}

Input/output types:

inputoutput
anyany

Examples

Std value from columns in a dataframe

> [[a b]; [6 2] [4 2] [2 2]] | polars into-df | polars std
╭───┬──────┬──────╮
 # │  a   │  b   │
├───┼──────┼──────┤
 0 2.00 0.00
╰───┴──────┴──────╯

Std aggregation for a group-by

> [[a b]; [one 2] [one 2] [two 1] [two 1]]
    | polars into-df
    | polars group-by a
    | polars agg (polars col b | polars std)
╭───┬─────┬──────╮
 # │  a  │  b   │
├───┼─────┼──────┤
 0 one 0.00
 1 two 0.00
╰───┴─────┴──────╯