Skip to content

Commit d23b5ed

Browse files
committed
Resolving pre-commit errors
1 parent 538a25c commit d23b5ed

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

pandas/core/arrays/base.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,17 +1005,21 @@ def interpolate(
10051005
----------
10061006
method : str, default 'linear'
10071007
Interpolation technique to use. One of:
1008-
* 'linear': Ignore the index and treat the values as equally spaced. This is the only method supported on MultiIndexes.
1009-
* 'time': Works on daily and higher resolution data to interpolate given length of interval.
1008+
* 'linear': Ignore the index and treat the values as equally spaced.
1009+
This is the only method supported on MultiIndexes.
1010+
* 'time': Works on daily and higher resolution data to interpolate
1011+
given length of interval.
10101012
* 'index', 'values': use the actual numerical values of the index.
10111013
* 'pad': Fill in NaNs using existing values.
1012-
* 'nearest', 'zero', 'slinear', 'quadratic', 'cubic', 'barycentric', 'polynomial':
1013-
Passed to scipy.interpolate.interp1d, whereas 'spline' is passed to
1014-
scipy.interpolate.UnivariateSpline. These methods use the numerical values of the index.
1015-
Both 'polynomial' and 'spline' require that you also specify an order (int),
1016-
e.g. arr.interpolate(method='polynomial', order=5).
1017-
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima', 'cubicspline':
1018-
Wrappers around the SciPy interpolation methods of similar names. See Notes.
1014+
* 'nearest', 'zero', 'slinear', 'quadratic', 'cubic', 'barycentric',
1015+
'polynomial': Passed to scipy.interpolate.interp1d, whereas 'spline'
1016+
is passed to scipy.interpolate.UnivariateSpline. These methods use
1017+
the numerical values of the index.
1018+
Both 'polynomial' and 'spline' require that you also specify an
1019+
order (int), e.g. arr.interpolate(method='polynomial', order=5).
1020+
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima',
1021+
'cubicspline': Wrappers around the SciPy interpolation methods
1022+
of similar names. See Notes.
10191023
* 'from_derivatives': Refers to scipy.interpolate.BPoly.from_derivatives.
10201024
axis : int
10211025
Axis to interpolate along. For 1D NumpyExtensionArray, use 0.
@@ -1026,11 +1030,15 @@ def interpolate(
10261030
limit_direction : {'forward', 'backward', 'both'}
10271031
Consecutive NaNs will be filled in this direction.
10281032
* If 'method' is 'pad' or 'ffill', 'limit_direction' must be 'forward'.
1029-
* If 'method' is 'backfill' or 'bfill', 'limit_direction' must be 'backward'.
1030-
Raises ValueError if limit_direction is 'forward' or 'both' and method is 'backfill' or 'bfill'.
1031-
Raises ValueError if limit_direction is 'backward' or 'both' and method is 'pad' or 'ffill'.
1033+
* If 'method' is 'backfill' or 'bfill', 'limit_direction' must be
1034+
'backward'.
1035+
Raises ValueError if limit_direction is 'forward' or 'both' and method
1036+
is 'backfill' or 'bfill'.
1037+
Raises ValueError if limit_direction is 'backward' or 'both' and method
1038+
is 'pad' or 'ffill'.
10321039
limit_area : {'inside', 'outside'} or None
1033-
If limit is specified, consecutive NaNs will be filled with this restriction.
1040+
If limit is specified, consecutive NaNs will be filled with this
1041+
restriction.
10341042
* None: No fill restriction.
10351043
* 'inside': Only fill NaNs surrounded by valid values (interpolate).
10361044
* 'outside': Only fill NaNs outside valid values (extrapolate).

0 commit comments

Comments
 (0)