polars.DataFrame.shift_and_fill#

DataFrame.shift_and_fill(
fill_value: int | str | float,
*,
n: int = 1,
) DataFrame[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 this value.

n

Number of places to shift (may be negative).