Skip to content

Std

Source code

Description

Aggregate the columns of this DataFrame to their standard deviation values.

Usage

<DataFrame>$std(ddof = 1)

Arguments

ddof Delta Degrees of Freedom: the divisor used in the calculation is N - ddof, where N represents the number of elements. By default ddof is 1.

Value

A DataFrame with one row.

Examples

library("polars")

as_polars_df(mtcars)$std()
#> shape: (1, 11)
#> ┌──────────┬──────────┬────────────┬───────────┬───┬──────────┬──────────┬──────────┬────────┐
#> │ mpg      ┆ cyl      ┆ disp       ┆ hp        ┆ … ┆ vs       ┆ am       ┆ gear     ┆ carb   │
#> │ ---      ┆ ---      ┆ ---        ┆ ---       ┆   ┆ ---      ┆ ---      ┆ ---      ┆ ---    │
#> │ f64      ┆ f64      ┆ f64        ┆ f64       ┆   ┆ f64      ┆ f64      ┆ f64      ┆ f64    │
#> ╞══════════╪══════════╪════════════╪═══════════╪═══╪══════════╪══════════╪══════════╪════════╡
#> │ 6.026948 ┆ 1.785922 ┆ 123.938694 ┆ 68.562868 ┆ … ┆ 0.504016 ┆ 0.498991 ┆ 0.737804 ┆ 1.6152 │
#> └──────────┴──────────┴────────────┴───────────┴───┴──────────┴──────────┴──────────┴────────┘