Skip to content

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

Merged
merged 5 commits into from
Aug 22, 2020
Merged

Conversation

MarianD
Copy link
Contributor

@MarianD MarianD commented Aug 8, 2020

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Co-authored-by: Marco Gorelli <[email protected]>
@MarianD MarianD requested a review from MarcoGorelli August 9, 2020 16:28
Return the mode(s) of the Series.

The mode is the value that appears most often.
It can be multiple values.
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

@MarcoGorelli MarcoGorelli Aug 22, 2020

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

Copy link
Contributor Author

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]>
@MarcoGorelli MarcoGorelli added this to the 1.2 milestone Aug 22, 2020
@MarcoGorelli MarcoGorelli merged commit 23b1717 into pandas-dev:master Aug 22, 2020
@MarcoGorelli
Copy link
Member

Thanks @MarianD

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