Site Navigation
Section Navigation
Alias for mean.
Examples
>>> df = pl.DataFrame({"a": [1, 8, 3], "b": [4, 5, 2], "c": ["foo", "bar", "foo"]})
>>> df.select(pl.avg("a"))
shape: (1, 1)
┌─────┐
│ a │
│ --- │
│ f64 │
╞═════╡
│ 4.0 │
└─────┘
>>> pl.avg(df["a"])
4.0