Method: Polars::Expr#arg_min

Defined in:
lib/polars/expr.rb

#arg_minExpr

Get the index of the minimal value.

Examples:

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

Returns:

[View source]

1507
1508
1509
# File 'lib/polars/expr.rb', line 1507

def arg_min
  _from_rbexpr(_rbexpr.arg_min)
end