Get the minimum value
Description
This function is syntactic sugar for col(names)$min()
.
Usage
pl$min(...)
Arguments
…
|
Name(s) of the columns to use in the aggregation. |
Value
A polars expression
Examples
library("polars")
df <- pl$DataFrame(
a = c(1, 8, 3),
b = c(4, 5, 2),
c = c("foo", "bar", "foo")
)
# Get the minimum value of a column
df$select(pl$min("a"))
#> shape: (1, 1)
#> ┌─────┐
#> │ a │
#> │ --- │
#> │ f64 │
#> ╞═════╡
#> │ 1.0 │
#> └─────┘
#> shape: (1, 2)
#> ┌─────┬─────┐
#> │ a ┆ b │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═════╪═════╡
#> │ 1.0 ┆ 2.0 │
#> └─────┴─────┘