polars.DataFrame.fill_null

DataFrame.fill_null(strategy: Union[str, polars.internals.expr.Expr, Any]) polars.internals.frame.DF

Fill null values using a filling strategy, literal, or Expr.

Parameters
strategy

One of: - “backward” - “forward” - “mean” - “min’ - “max” - “zero” - “one” Or an expression.

Returns
DataFrame with None values replaced by the filling strategy.