Spec-Zone.ru › Polars

polars.Expr.arg_min

Expr.arg_min() → Expr

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.

engine:In MemoryStreaming

Examples

>>> df = pl.DataFrame(
...     {
...         "a": [20, 10, 30],
...     }
... )
>>> df.select(pl.col("a").arg_min())
shape: (1, 1)
┌─────┐
│ a   │
│ --- │
│ u32 │
╞═════╡
│ 1   │
└─────┘

© 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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API