Skip to content

DOC: simply method='bfill'? #46631

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
kwhkim opened this issue Apr 4, 2022 · 2 comments · Fixed by #46642
Closed
1 task done

DOC: simply method='bfill'? #46631

kwhkim opened this issue Apr 4, 2022 · 2 comments · Fixed by #46642
Labels
Docs Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone

Comments

@kwhkim
Copy link
Contributor

kwhkim commented Apr 4, 2022

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/user_guide/cookbook.html#cookbook-missing-data

Documentation problem

DOC says use df.reindex(df.index[::-1]).ffill()
but df.bfill() is available, maybe after some version? I don't know

Do we need to do df.reindex(df.index[::-1]).bfill() when index is alway sorted?

Suggested fix for documentation

replace df.reindex(df.index[::-1]).ffill() with df.bfill()

@kwhkim kwhkim added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 4, 2022
@CloseChoice CloseChoice removed the Needs Triage Issue that has not been reviewed by a pandas team member label Apr 4, 2022
@CloseChoice
Copy link
Member

CloseChoice commented Apr 4, 2022

Your suggestion looks good to me. Would you like to file a PR?

@kwhkim
Copy link
Contributor Author

kwhkim commented Apr 5, 2022

yes, i'll replace df.reindex(df.index[::-1]).ffill() with df.bfill()

@kwhkim kwhkim mentioned this issue Apr 5, 2022
4 tasks
@jreback jreback added this to the 1.5 milestone Apr 5, 2022
@jreback jreback added the Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate label Apr 5, 2022
jreback pushed a commit that referenced this issue Apr 5, 2022
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this issue Jul 13, 2022
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