-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fixed docstring for mode() #35624
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
- Explanation of mode() function
Co-authored-by: Marco Gorelli <[email protected]>
pandas/core/series.py
Outdated
Return the mode(s) of the Series. | ||
|
||
The mode is the value that appears most often. | ||
It can be multiple values. |
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.
Can this fit on one line? Otherwise LGTM.
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.
The first line of a docstring is limited to 55 characters. Other 2 lines in my suggestion will be displayed in the documentation anyway as 1 line.
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.
@MarianD can't these 2 extra lines you've added fit on a single line?
In [6]: len(""" The mode is the value that appears most often. It can be multiple values.""")
Out[6]: 81
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.
@MarcoGorelli, thanks for your tip, done.
- Fixed 1st line of docstring - Added explanation for mode() function - Explanation for mode(): joined 2 lines into 1
Co-authored-by: Daniel Saxton <[email protected]>
Thanks @MarianD |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff