Transformer that applies linear interpolation to time series data.
The transformer always runs y.interpolate(method="linear") first. The on_missing keyword then chooses how to handle any NaN that linear interpolation cannot bridge (typically the leading and trailing endpoints of the series).
Parameters
Name
Type
Description
Default
on_missing
OnMissing
Contract for residual NaN after linear interpolation. - "raise" (default, fail-safe): raise ValueError if any NaN remains. Refuses to silently embed imputed values disguised as measurements. - "ffill_bfill": explicit opt-in to endpoint forward-then-backward fill, so that leading and trailing NaNs are both bridged. - "passthrough": return the linearly interpolated series unchanged. The caller promises to handle the residual NaN downstream.