pandas.api.extensions.ExtensionArray.interpolate

pandas 3.1.1 · Extensions · method

Estimate missing values from neighboring observations using a selected interpolation method.

Call syntax

pd.api.extensions.ExtensionArray.interpolate(…) Full signature
pd.api.extensions.ExtensionArray.interpolate(
    *,
    method,
    axis,
    index,
    limit,
    limit_direction,
    limit_area,
    copy,
    **kwargs,
)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
method Required
Keyword only
str

Choose the algorithm used to calculate, align, or fill the result.

axis Required
Keyword only
int

Choose which axis the operation acts on. The accepted axis labels depend on the receiver.

index Required
Keyword only
Index

Supply row labels or control how existing row labels are used.

limit Required
Keyword only
int or None

Set a maximum number of items affected by the operation.

limit_direction Required
Keyword only
{'forward', 'backward', 'both'}

Choose whether to fill forward, backward, or in both directions where supported.

limit_area Required
Keyword only
{'inside', 'outside'} or None

Restrict filling to gaps inside or outside valid observations.

copy Required
Keyword only
bool

Control whether data is copied where the API supports that choice.

**kwargs Optional
Additional keyword arguments

Returns

ExtensionArray