Skip to content

Commit 2bf0bf5

Browse files
committed
DOC: updated docstrings reindex func pep8 GH40328
1 parent d684b99 commit 2bf0bf5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/core/indexes/base.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -3769,24 +3769,25 @@ def reindex(self, target, method=None, level=None, limit=None, tolerance=None):
37693769
----------
37703770
target : an iterable
37713771
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
3772+
Method to use for filling holes in reindexed DataFrame.
3773+
Please note: this is only applicable to DataFrames/Series
37743774
with a monotonically increasing/decreasing index.
37753775
- None (default): don’t fill gaps
37763776
- pad / ffill: Propagate last valid observation forward to next valid.
37773777
- backfill / bfill: Use next valid observation to fill gap.
37783778
- nearest: Use nearest valid observations to fill gap.
37793779
level : int or name
3780-
Broadcast across a level, matching Index values on the passed MultiIndex level.
3780+
Broadcast across a level, matching Index values on
3781+
the passed MultiIndex level.
37813782
limit : int, default None
37823783
Maximum number of consecutive elements to forward or backward fill.
37833784
tolerance : optional
3784-
Maximum distance between original and new labels for inexact matches.
3785+
Maximum distance between original and new labels for inexact matches.
37853786
The values of the index at the matching locations most satisfy the
37863787
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
3788+
Tolerance may be a scalar value, which applies the same tolerance
3789+
to all values, or list-like, which applies variable tolerance per element.
3790+
List-like includes list, tuple, array, Series, and must be the same size
37903791
as the index and its dtype must exactly match the index’s type.
37913792
37923793
Returns
@@ -3796,7 +3797,6 @@ def reindex(self, target, method=None, level=None, limit=None, tolerance=None):
37963797
indexer : np.ndarray or None
37973798
Indices of output values in original index.
37983799
3799-
38003800
Examples
38013801
--------
38023802
>>> index = ['a', 'b', 'c', 'd']

0 commit comments

Comments
 (0)