pandas.api.typing.Resampler.nearest

pandas 3.1.1 · Resampling · method

Fill new resampling positions from their nearest observations, optionally limiting consecutive fills.

Call syntax

pd.api.typing.Resampler.nearest(limit=None)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
limit Optional
Positional or keyword
Default None
int

Set a maximum number of items affected by the operation.

Returns

Series or DataFrame