Method: Polars::Expr#nan_max

Defined in:
lib/polars/expr.rb

#nan_maxExpr

Get maximum value, but propagate/poison encountered NaN values.

Examples:

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

Returns:

[View source]

2041
2042
2043
# File 'lib/polars/expr.rb', line 2041

def nan_max
  _from_rbexpr(_rbexpr.nan_max)
end