-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: improve description of the example which dataframe has two rows #36971
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
Conversation
improve description of the examplewhich dataframe has two rows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I agree that this is clearer, am just leaving a suggestion
pandas/core/frame.py
Outdated
@@ -8972,7 +8972,7 @@ def mode(self, axis=0, numeric_only=False, dropna=True) -> DataFrame: | |||
|
|||
By default, missing values are not considered, and the mode of wings | |||
are both 0 and 2. The second row of species and legs contains ``NaN``, | |||
because they have only one mode, but the DataFrame has two rows. | |||
because they have only one mode, but the resulting DataFrame has two rows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
Because the resulting DataFrame has two rows, the second row of ``species`` and ``legs`` contains ``NaN``
? (you may need to wrap this around multiple lines)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is more descriptive. Totally agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool - could you also put a more descriptive title for your pull request please?
improve description of the example which dataframe has two rows
Thanks @yonashub In the future, it would be better to create a new branch when submitting PRs, see the contributing guide |
…andas-dev#36971) * fix issue 36970 improve description of the examplewhich dataframe has two rows * improve description of example improve description of the example which dataframe has two rows * improve description of the example describing mode operation. * remove trailing extra line * preserve newline Co-authored-by: yonas kassa <[email protected]> Co-authored-by: Marco Gorelli <[email protected]>
…andas-dev#36971) * fix issue 36970 improve description of the examplewhich dataframe has two rows * improve description of example improve description of the example which dataframe has two rows * improve description of the example describing mode operation. * remove trailing extra line * preserve newline Co-authored-by: yonas kassa <[email protected]> Co-authored-by: Marco Gorelli <[email protected]>
improve description of the example which dataframe has two rows
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff