polars.internals.expr.list.ExprListNameSpace.arg_min#

ExprListNameSpace.arg_min() Expr[source]#

Retrieve the index of the minimal value in every sublist.

Returns:
Series of dtype UInt32/UInt64 (depending on compilation)

Examples

>>> df = pl.DataFrame(
...     {
...         "a": [[1, 2], [2, 1]],
...     }
... )
>>> df.select(pl.col("a").arr.arg_min())
shape: (2, 1)
┌─────┐
│ a   │
│ --- │
│ u32 │
╞═════╡
│ 0   │
├╌╌╌╌╌┤
│ 1   │
└─────┘