Get the maximum value.
Description
Syntactic sugar for pl$col(…)$max()
.
Usage
pl$max(...)
Arguments
…
|
Characters indicating the column names, passed to pl$col() .
See ?pl_col for details.
|
Value
Expr
See Also
-
\
$max() -
pl$max_horizontal()
Examples
library("polars")
df = pl$DataFrame(
num_1 = c(1, 8, 3),
num_2 = c(4, 5, 2),
chr_1 = c("foo", "bar", "foo")
)
df$select(pl$max("num_1"))
#> shape: (1, 1)
#> ┌───────┐
#> │ num_1 │
#> │ --- │
#> │ f64 │
#> ╞═══════╡
#> │ 8.0 │
#> └───────┘
#> shape: (1, 2)
#> ┌───────┬───────┐
#> │ num_1 ┆ num_2 │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═══════╪═══════╡
#> │ 8.0 ┆ 5.0 │
#> └───────┴───────┘
#> shape: (1, 2)
#> ┌───────┬───────┐
#> │ num_1 ┆ num_2 │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═══════╪═══════╡
#> │ 8.0 ┆ 5.0 │
#> └───────┴───────┘