-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Correct/update skipna docstrings for any
and all
(#23109)
#24069
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
…#23109) Also include examples with NA values and clarify treatment of NA with `skipna == False`
Hello @jamesmyatt! Thanks for updating the PR.
Comment last updated on December 10, 2018 at 14:45 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #24069 +/- ##
===========================================
+ Coverage 42.38% 92.25% +49.86%
===========================================
Files 161 161
Lines 51699 51699
===========================================
+ Hits 21913 47694 +25781
+ Misses 29786 4005 -25781
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24069 +/- ##
==========================================
+ Coverage 92.21% 92.21% +<.01%
==========================================
Files 162 162
Lines 51721 51723 +2
==========================================
+ Hits 47692 47694 +2
Misses 4029 4029
Continue to review full report at Codecov.
|
pls also merge master. ping on green. |
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.
looks good, just couple of comments
can you also merge master |
@jreback , will do as soon as I've made the outstanding changes. Do you have any views on the comments above? |
@jamesmyatt, added a comment (sorry for the delay), let me know if you need any other information to finish this PR |
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.
Looks good, thanks @jamesmyatt. Couple of minor things. Also, would be good if you can change the return section to simply %(name1)s or %(name2)s
, and in the next line indented, if you can add a short description of what is returned, that would be great.
@jreback , @datapythonista , I think this should be ready now. Thanks. |
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.
Looks good, just two small things. Also, did you run ./scripts/validate_docstrings.py pandas.Series.any
and same for all
, to see there are no errors?
pandas/core/generic.py
Outdated
@@ -10596,11 +10607,12 @@ def _doc_parms(cls): | |||
DataFrame.all : Return whether all elements are True over requested axis. | |||
""" | |||
|
|||
_any_desc = """\ | |||
Return whether any element is True over requested axis. | |||
_any_doc = """\ |
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.
I guess you changed the name to be consitent with the all
, but it should be the other way round, this should be named _any_summary
(or _any_desc
). For the convention we use _any_doc
should be the whole docstring of the any
method.
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.
Yes. I did wonder if that was the right way round. I'll change them both to _desc
.
I also considered moving the any
variables to be close to the all
and _bool_doc
ones. What do you think?
Thanks, @datapythonista . I haven't been able to run validate_docstrings.py because I can't build pandas yet: I'm using Windows and I installed the C compiler yet. Although, I have checked the new examples manually: https://gist.github.com/jamesmyatt/8c6aa9178346e25e3175500672714ca5 BTW, it's a bit annoying that the contributing guide linked from README doesn't match what's in master: I had lots of trouble with the environment files for a little while. |
The contributing guide you are using is for The one corresponding to It could make sense to somehow "hide" the one for master, and have a link for the devs, as it's probably the only relevant one. How to do this is probably not trivial. But creating an issue, and may be a PR if you have an idea on how to address that, would be useful. |
I've run Turns out it's not so hard to install the compiler for Windows these days. I'll suggest an improvement to contributing.rst later. |
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.
lgtm, thanks @jamesmyatt
thanks. ping on green. |
@jreback , ping. There are 2 warnings in PublishTestResults, which I assume is nothing to do with this. |
thanks! |
Also, include examples with NA values and describe treatment of NA with
skipna == False
git diff upstream/master -u -- "*.py" | flake8 --diff