@@ -1005,17 +1005,21 @@ def interpolate(
1005
1005
----------
1006
1006
method : str, default 'linear'
1007
1007
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.
1010
1012
* 'index', 'values': use the actual numerical values of the index.
1011
1013
* '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.
1019
1023
* 'from_derivatives': Refers to scipy.interpolate.BPoly.from_derivatives.
1020
1024
axis : int
1021
1025
Axis to interpolate along. For 1D NumpyExtensionArray, use 0.
@@ -1026,11 +1030,15 @@ def interpolate(
1026
1030
limit_direction : {'forward', 'backward', 'both'}
1027
1031
Consecutive NaNs will be filled in this direction.
1028
1032
* 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'.
1032
1039
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.
1034
1042
* None: No fill restriction.
1035
1043
* 'inside': Only fill NaNs surrounded by valid values (interpolate).
1036
1044
* 'outside': Only fill NaNs outside valid values (extrapolate).
0 commit comments