polars.std#

polars.std(column: str, ddof: int = 1) Expr[source]#
polars.std(column: Series, ddof: int = 1) float | None

Get the standard deviation.

Examples

>>> df = pl.DataFrame({"a": [1, 8, 3], "b": [4, 5, 2], "c": ["foo", "bar", "foo"]})
>>> df.select(pl.std("a"))
shape: (1, 1)
┌──────────┐
│ a        │
│ ---      │
│ f64      │
╞══════════╡
│ 3.605551 │
└──────────┘
>>> df["a"].std()
3.605551275463989