polars.Series.shift_and_fill#

Series.shift_and_fill(fill_value: int | Expr, *, n: int = 1) Series[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).