Method: Polars::Expr#mean

Defined in:
lib/polars/expr.rb

#meanExpr

Get mean value.

Examples:

df = Polars::DataFrame.new({"a" => [-1, 0, 1]})
df.select(Polars.col("a").mean)
# =>
# shape: (1, 1)
# ┌─────┐
# │ a   │
# │ --- │
# │ f64 │
# ╞═════╡
# │ 0.0 │
# └─────┘

Returns:



2369
2370
2371
# File 'lib/polars/expr.rb', line 2369

def mean
  wrap_expr(_rbexpr.mean)
end