Skip to content

Get variance

Source code

Description

Get variance

Usage

<Expr>$var(ddof = 1)

Arguments

ddof An integer representing "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

Expr

Examples

library("polars")

pl$select(pl$lit(1:5)$var())
#> shape: (1, 1)
#> ┌─────┐
#> │     │
#> │ --- │
#> │ f64 │
#> ╞═════╡
#> │ 2.5 │
#> └─────┘