-
Notifications
You must be signed in to change notification settings - Fork 0
DOC Series.sort_values docstring [Sao Paulo] #1
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
pandas/core/series.py
Outdated
|
||
**Sort values ascending order** | ||
|
||
>>> s.sort_values(ascending= True) |
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.
No spaces surrounding = for keyword arguments.
pandas/core/series.py
Outdated
|
||
**Sort values descending order** | ||
|
||
>>> s.sort_values(ascending= False) |
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.
No spaces surrounding = for keyword arguments.
pandas/core/series.py
Outdated
|
||
**Sort values inplace** | ||
|
||
>>> s.sort_values(ascending= False, inplace= True) |
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.
No spaces surrounding = for keyword arguments.
pandas/core/series.py
Outdated
|
||
**Sort values putting NAs first** | ||
|
||
>>> s.sort_values(na_position= 'first') |
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.
No spaces surrounding = for keyword arguments.
PEP8: 4th bullet point in: https://www.python.org/dev/peps/pep-0008/#other-recommendations |
pandas/core/series.py
Outdated
|
||
Returns | ||
------- | ||
sorted_obj : Series |
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.
Returned values need not to be named except if inside tuples.
pandas/core/series.py
Outdated
7 45.0 | ||
dtype: float64 | ||
|
||
**Sort values ascending order** |
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.
Is this using bold font? The guidelines don't forbid it explicitly but simply says:
Sort values ascending order:
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.
Replace "Sort ascending (True) or descending (False)." with "True
if ascending sort or False
otherwise."
Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):
scripts/validate_docstrings.py <your-function-or-method>
git diff upstream/master -u -- "*.py" | flake8 --diff
python doc/make.py --single <your-function-or-method>
Please include the output of the validation script below between the "```" ticks:
If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.
Checklist for other PRs (remove this part if you are doing a PR for the pandas documentation sprint):
git diff upstream/master -u -- "*.py" | flake8 --diff