Skip to content

DOC: Improve documentation df.interpolate() for methods ‘time’, ‘index’ and ‘values’ #60227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
aleksejs-fomins opened this issue Nov 7, 2024 · 2 comments · Fixed by #60247
Closed
1 task done
Assignees
Labels
Docs Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone

Comments

@aleksejs-fomins
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.interpolate.html

Documentation problem

It is not possible to understand what exactly the method interpolate does from reading the documentation. See e.g. this SE post for more details

https://stackoverflow.com/questions/65511992/pandas-interpolation-type-when-method-index

Suggested fix for documentation

Rewrite doctstring and documentation page for the method

@aleksejs-fomins aleksejs-fomins added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Nov 7, 2024
@rhshadrach
Copy link
Member

Thanks for the report, agreed this could use clarification. PRs to improve are welcome!

@rhshadrach rhshadrach added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Nov 7, 2024
@anishkarki
Copy link
Contributor

take

anishkarki pushed a commit to anishkarki/pandas that referenced this issue Nov 8, 2024
@rhshadrach rhshadrach added this to the 3.0 milestone Nov 12, 2024
mroeschke pushed a commit that referenced this issue Nov 12, 2024
 (#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants