polars.Series.interpolate

Series.interpolate() polars.internals.series.Series

Interpolate intermediate values. The interpolation method is linear.

Examples

>>> s = pl.Series("a", [1, 2, None, None, 5])
>>> s.interpolate()
shape: (5,)
Series: 'a' [i64]
[
    1
    2
    3
    4
    5
]