@@ -3763,11 +3763,31 @@ def _validate_can_reindex(self, indexer: np.ndarray) -> None:
3763
3763
3764
3764
def reindex (self , target , method = None , level = None , limit = None , tolerance = None ):
3765
3765
"""
3766
- Create index with target's values.
3766
+ Create an index with target's values.
3767
3767
3768
3768
Parameters
3769
3769
----------
3770
3770
target : an iterable
3771
+ method : {None, ‘backfill’/’bfill’, ‘pad’/’ffill’, ‘nearest’}
3772
+ Method to use for filling holes in reindexed DataFrame.
3773
+ Please note: this is only applicable to DataFrames/Series
3774
+ with a monotonically increasing/decreasing index.
3775
+ - None (default): don’t fill gaps
3776
+ - pad / ffill: Propagate last valid observation forward to next valid.
3777
+ - backfill / bfill: Use next valid observation to fill gap.
3778
+ - nearest: Use nearest valid observations to fill gap.
3779
+ level : int or name
3780
+ Broadcast across a level, matching Index values on the passed MultiIndex level.
3781
+ limit : int, default None
3782
+ Maximum number of consecutive elements to forward or backward fill.
3783
+ tolerance : optional
3784
+ Maximum distance between original and new labels for inexact matches.
3785
+ The values of the index at the matching locations most satisfy the
3786
+ equation `abs(index[indexer] - target) <= tolerance.
3787
+ Tolerance may be a scalar value, which applies the same tolerance to all values,
3788
+ or list-like, which applies variable tolerance per element.
3789
+ List-like includes list, tuple, array, Series, and must be the same size
3790
+ as the index and its dtype must exactly match the index’s type.
3771
3791
3772
3792
Returns
3773
3793
-------
0 commit comments