polars.Series.arg_min#
- Series.arg_min() int | None[source]#
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.
- Returns:
- int
Examples
>>> s = pl.Series("a", [3, 2, 1]) >>> s.arg_min() 2