Skip to content

Get the maximum value

Description

Get the maximum value

Usage

<Expr>$max()

Value

A polars expression

Examples

library("polars")

pl$DataFrame(x = c(1, NaN, 3))$
  with_columns(max = pl$col("x")$max())
#> shape: (3, 2)
#> ┌─────┬─────┐
#> │ x   ┆ max │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═════╪═════╡
#> │ 1.0 ┆ 3.0 │
#> │ NaN ┆ 3.0 │
#> │ 3.0 ┆ 3.0 │
#> └─────┴─────┘