polars.Expr.shift_and_fill#

Expr.shift_and_fill(fill_value: IntoExpr, *, n: int = 1) Self[source]#

Shift values by the given number of places and fill the resulting null values.

Deprecated since version 0.19.12: Use shift() instead.

Parameters:
fill_value

Fill None values with the result of this expression.

n

Number of places to shift (may be negative).