-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Improved the docstring of Series.any() #20078
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
Does this close a specific issue? |
pandas/core/generic.py
Outdated
|
||
Examples | ||
-------- | ||
>>> s1 = pd.Series([1,2,3]) |
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.
Could you add spaces after the commas here so this is pep8 compliant?
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.
Okay, will do.
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.
Done.
pandas/core/generic.py
Outdated
>>> s2.any() | ||
False | ||
|
||
>>> s3 = pd.Series([1,2,3,"Hobbit"]) |
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.
This last one is a bug: #12863 It should return True / False.
I think just remove it for now.
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.
yeah, I sensed it 👍
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.
Done.
Codecov Report
@@ Coverage Diff @@
## master #20078 +/- ##
==========================================
+ Coverage 91.7% 91.72% +0.02%
==========================================
Files 150 150
Lines 49122 49149 +27
==========================================
+ Hits 45045 45083 +38
+ Misses 4077 4066 -11
Continue to review full report at Codecov.
|
@FrankDupree can you please read carefully the doc on how to submit a PR [1], and make sure you do all the steps correctly? You surely missed the point about the title of the PR, and also copying the output of the Btw, in the description of the PR, the Thank you! |
Are |
%(desc)s | ||
|
||
Returns True if one (or more) elements are non-zero, | ||
not-empty or not-False. | ||
|
||
Parameters | ||
---------- | ||
axis : %(axis_descr)s |
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.
Missing description
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.
(never mind)
Please update the description with the validation script output |
bool_only : boolean, default None | ||
Include only boolean columns. If None, will attempt to use everything, | ||
then use only boolean data. Not implemented for Series. | ||
**kwargs : Additional keywords have no effect but might be accepted for |
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.
@datapythonista is this the language generally recommending here?
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 didn't see this earlier. I think the description is similar to the ones used in kwargs
with similar behavior. But it should go in the next line, as in the other parameters, and in this line simply leave **kwargs
@FrankDupree Some things have changed in master. Can you check if there's anything else to be done? |
@TomAugspurger I will. |
So it seems we had a conflicting PR #20217 that implemented I am going to close this PR, but please check if there is anything in your PR that is not in http://pandas-docs.github.io/pandas-docs-travis/generated/pandas.Series.any.html#pandas.Series.any. |
Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):
scripts/validate_docstrings.py Series.any()
git diff upstream/master -u -- "*.py" | flake8 --diff
python doc/make.py --single Series.any()
Please include the output of the validation script below between the "```" ticks:
Participants of the documentation sprint were told to go ahead with the description of the "**kwargs" parameter.
Parameter "axis" has no description looks like a bug to me. Noticed some other methods show the same validation error. e.g "pandas.Series.mean" throws the same validation error.