Skip to content

DOC: Clarify DataFrame.combine_first and Series.combine_first #40279

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

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

HeidiNeuhaeuser
Copy link
Contributor

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@MarcoGorelli MarcoGorelli self-requested a review March 6, 2021 18:03
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @HeidiNeuhaeuser , I like the example

I just have some minor suggestions

Also, it would be good to share the docstrings between the Series and DataFrame methods (see to_markdown, among others, for an example of how this is one), either here or in a follow-up pull request

Comment on lines 2994 to 2995
Combine two Series objects by filling null values in one Series with
non-null values from the other Series.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per the corresponding line in frame.py, perhaps mention that the resulting index will be the union of the two?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was in the "Notes" section, I moved that for consistency.


Parameters
----------
other : Series
The value(s) to be combined with the `Series`.
The value(s) to be used for filling null values in `Series`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps just "The value(s) to be used for filling null values"?

@MarcoGorelli MarcoGorelli added this to the 1.3 milestone Mar 7, 2021
@pep8speaks
Copy link

pep8speaks commented Mar 7, 2021

Hello @HeidiNeuhaeuser! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-03-07 19:40:27 UTC

@MarcoGorelli MarcoGorelli self-requested a review March 7, 2021 20:13
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks - do you want to try making a shared docstring (like there is in to_markdown and some other methods) or should I open that as a good first issue for someone else to take on?

@jreback jreback merged commit d910a44 into pandas-dev:master Mar 8, 2021
@jreback
Copy link
Contributor

jreback commented Mar 8, 2021

thanks @HeidiNeuhaeuser if you'd like to make a shared doc-string as suggested by @MarcoGorelli pls open a new PR

jbrockmendel pushed a commit to jbrockmendel/pandas that referenced this pull request Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants