Skip to content

Commit

Permalink
DOC: Additions/updates documentation for df.interpolate() methods pan…
Browse files Browse the repository at this point in the history
…das-dev#60227 (pandas-dev#60247)

* DOC: Improve documentation for df.interpolate() methods pandas-dev#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]>
  • Loading branch information
3 people authored Nov 12, 2024
1 parent 938832b commit 73da90c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7668,8 +7668,12 @@ def interpolate(
* 'linear': Ignore the index and treat the values as equally
spaced. This is the only method supported on MultiIndexes.
* 'time': Works on daily and higher resolution data to interpolate
given length of interval.
* 'index', 'values': use the actual numerical values of the index.
given length of interval. This interpolates values based on
time interval between observations.
* 'index': The interpolation uses the numerical values
of the DataFrame's index to linearly calculate missing values.
* 'values': Interpolation based on the numerical values
in the DataFrame, treating them as equally spaced along the index.
* 'nearest', 'zero', 'slinear', 'quadratic', 'cubic',
'barycentric', 'polynomial': Passed to
`scipy.interpolate.interp1d`, whereas 'spline' is passed to
Expand Down

0 comments on commit 73da90c

Please sign in to comment.