pandas.api.extensions.ExtensionArray.interpolate#

ExtensionArray.interpolate(*, method, axis, index, limit, limit_direction, limit_area, copy, **kwargs)[源代码][源代码]#

请参阅 DataFrame.interpolate.__doc__。

例子

>>> arr = pd.arrays.NumpyExtensionArray(np.array([0, 1, np.nan, 3]))
>>> arr.interpolate(
...     method="linear",
...     limit=3,
...     limit_direction="forward",
...     index=pd.Index([1, 2, 3, 4]),
...     fill_value=1,
...     copy=False,
...     axis=0,
...     limit_area="inside",
... )
<NumpyExtensionArray>
[0.0, 1.0, 2.0, 3.0]
Length: 4, dtype: float64