Skip to content

Get the index of the minimal value

Description

Get the index of the minimal value

Usage

<Expr>$arg_min()

Value

A polars expression

Examples

library("polars")

df <- pl$DataFrame(a = c(20, 10, 30))
df$select(pl$col("a")$arg_min())
#> shape: (1, 1)
#> ┌─────┐
#> │ a   │
#> │ --- │
#> │ u32 │
#> ╞═════╡
#> │ 1   │
#> └─────┘