polars icon indicating copy to clipboard operation
polars copied to clipboard

Does `arg_max` always return the first maximal index?

Open cmdlineluser opened this issue 5 months ago • 0 comments

Description

In my testing, it always has - but it is not stated in the docs:

"Get the index of the maximal value."

Pandas .idxmax()^1 for comparison:

"Return index of first occurrence of maximum over requested axis."

Does Polars also guarantee this?

Link

https://docs.pola.rs/api/python/dev/reference/expressions/api/polars.Expr.arg_max.html#polars.Expr.arg_max

cmdlineluser avatar Aug 26 '24 20:08 cmdlineluser