-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: update the pandas.Series.where docstring #20165
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
Hello @simobasso! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on July 08, 2018 at 16:01 Hours UTC |
5bc9c63
to
9b909e8
Compare
Please, change PR's title to: "DOC: update the pandas.Series.where docstring" |
@jbigatti done but FYI |
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.
Thanks a lot for the PR!
Added some inline comments. One additional comment: in the Examples section, can you add a bit of explanation between the current examples? (explaining what the following example will do or how it is different from the previous one, to give readers some context when looking at it)
pandas/core/generic.py
Outdated
Return an object of same shape as self and whose corresponding | ||
entries are from self where `cond` is %(cond)s and otherwise are from | ||
`other`. | ||
Replace values that don't respect a `cond` condition. |
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.
"don't respect" is too specific for where
I think. Can you make this Replace values where the condition is %(cond)s .
pandas/core/generic.py
Outdated
`other`. | ||
Replace values that don't respect a `cond` condition. | ||
|
||
Return an object of same shape as self with entries that |
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.
Ideally we should try to avoid using "self", as not necessarily all our users know this concept. You can for example change it to "the calling object"
pandas/core/generic.py
Outdated
|
||
.. deprecated:: 0.21.0 | ||
Use `error`. |
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 you add an extra indentation level to this line? (so sphinx knows it is part of the deprecated directive
and 'error' -> 'errors'
Codecov Report
@@ Coverage Diff @@
## master #20165 +/- ##
=========================================
Coverage ? 91.72%
=========================================
Files ? 150
Lines ? 49152
Branches ? 0
=========================================
Hits ? 45086
Misses ? 4066
Partials ? 0
Continue to review full report at Codecov.
|
Thanks @simobasso ! |
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