Spec-Zone.ru › Nushell

polars std for dataframe

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

Signature

> polars std {flags}

Input/output types:

input output
polars_expression polars_expression
polars_dataframe polars_dataframe
polars_lazyframe polars_lazyframe

Examples

Std value from columns in a dataframe

> [[a b]; [6 2] [4 2] [2 2]] | polars into-df | polars std | polars collect
╭───┬──────┬──────╮
│ # │  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)
            | polars collect
            | polars sort-by a
╭───┬─────┬──────╮
│ # │  a  │  b   │
├───┼─────┼──────┤
│ 0 │ one │ 0.00 │
│ 1 │ two │ 0.00 │
╰───┴─────┴──────╯

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_std.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API