polars.Series.arr.arg_min#

Series.arr.arg_min() Series[source]#

Retrieve an index of a minimal value in every sub-array.

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:
Series

Series of data type UInt32 or UInt64 (depending on compilation).

Examples

>>> s = pl.Series("a", [[3, 2, 1], [9, 1, 2]], dtype=pl.Array(pl.Int64, 3))
>>> s.arr.arg_min()
shape: (2,)
Series: 'a' [u32]
[
    2
    1
]