Skip to content

Get maximum value

Source code

Description

Get maximum value

Usage

<Expr>$max()

Value

Expr

Examples

library("polars")

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