polars.Expr.arg_min
-
Get an index of a minimal value.
When multiple values are equal to the minimum, this function may arbitrarily return the index of any of the minimum values. In this case, the returned index is not guaranteed to be the same across multiple runs.
Examples
>>> df = pl.DataFrame( ... { ... "a": [20, 10, 30], ... } ... ) >>> df.select(pl.col("a").arg_min()) shape: (1, 1) ┌─────┐ │ a │ │ --- │ │ u32 │ ╞═════╡ │ 1 │ └─────┘
Expr.arg_min() → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.arg_min.html