Skip to content

Commit 73da90c

Browse files
anishkarkianishkarkirhshadrach
authored
DOC: Additions/updates documentation for df.interpolate() methods #60227 (#60247)
* DOC: Improve documentation for df.interpolate() methods #60227 * DOC: Fix rounding in DataFrame.interpolate index method example * Fix: Use index method for linear interpolation with non-sequential index * Refactor: Rename DataFrame variable for non-sequential index * Refactor: Added Example for non-sequential dataframe at the end of docstring * CLN: Remove trailing whitespace in docstring and adding comment * DOC: Revert added non-sequential index example in interpolate() docstring * Update pandas/core/generic.py Co-authored-by: Richard Shadrach <[email protected]> * Update pandas/core/generic.py Co-authored-by: Richard Shadrach <[email protected]> * Trigger CI * Trigger CI --------- Co-authored-by: anishkarki <swordfish@DESKTOP-F6H5D41> Co-authored-by: Richard Shadrach <[email protected]>
1 parent 938832b commit 73da90c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/core/generic.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -7668,8 +7668,12 @@ def interpolate(
76687668
* 'linear': Ignore the index and treat the values as equally
76697669
spaced. This is the only method supported on MultiIndexes.
76707670
* 'time': Works on daily and higher resolution data to interpolate
7671-
given length of interval.
7672-
* 'index', 'values': use the actual numerical values of the index.
7671+
given length of interval. This interpolates values based on
7672+
time interval between observations.
7673+
* 'index': The interpolation uses the numerical values
7674+
of the DataFrame's index to linearly calculate missing values.
7675+
* 'values': Interpolation based on the numerical values
7676+
in the DataFrame, treating them as equally spaced along the index.
76737677
* 'nearest', 'zero', 'slinear', 'quadratic', 'cubic',
76747678
'barycentric', 'polynomial': Passed to
76757679
`scipy.interpolate.interp1d`, whereas 'spline' is passed to

0 commit comments

Comments
 (0)