-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: update the pandas.DataFrame.isna and pandas.Series.isna docstring #20138
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/generic.py
Outdated
------- | ||
bool of type %(klass)s | ||
Mask of True/False values for each element in %(klass)s that | ||
indicates whether an element is an NA value |
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 dot
pandas/core/indexes/base.py
Outdated
|
||
.. versionadded:: 0.20.0 | ||
|
||
Returns | ||
------- | ||
a boolean array of whether my values are NA | ||
numpy.ndarray | ||
A boolean array of whether my values are NA |
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 dot
Hello @Donk23! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on March 13, 2018 at 12:47 Hours UTC |
|
pandas/core/indexes/base.py
Outdated
|
||
.. versionadded:: 0.20.0 | ||
|
||
Returns | ||
------- | ||
numpy.ndarray | ||
A boolean array of whether my values are NA | ||
a boolean array of whether my values are NA |
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.
The right format should probably be
numpy.ndarray
Boolean array of whether my values are NA.
Though I'd advise against "my values" and refer to the data structure.
The documentation of the return is also similar to the parameters. But in this case, no name will be provided, unless the method returns or yields more than one value (a tuple of values).
The parameters are defined by their name, followed by a space, a colon, another space, and the type (or types). Note that the space between the name and the colon is important. Types are not defined for *args and **kwargs, but must be defined for all other parameters. After the parameter definition, it is required to have a line with the parameter description, which is indented, and can have multiple lines. The description must start with a capital letter, and finish with a dot.
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.
Please ignore, was from incorrect commit
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.
Minor comment, for the rest looking very good!
pandas/core/generic.py
Outdated
values. | ||
Everything else get mapped to False values. Characters such as empty | ||
strings `''` or :attr:`numpy.inf` are not considered NA values | ||
(unless you set :attr:`pandas.options.mode.use_inf_as_na` `= 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.
Similar comment here as on the notna PR
pandas/core/generic.py
Outdated
|
||
Returns | ||
------- | ||
bool of type %(klass)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.
and here as well
Codecov Report
@@ Coverage Diff @@
## master #20138 +/- ##
=========================================
Coverage ? 91.7%
=========================================
Files ? 150
Lines ? 49152
Branches ? 0
=========================================
Hits ? 45074
Misses ? 4078
Partials ? 0
Continue to review full report at Codecov.
|
Made the changes. Now it should be consistent with the .notna docstrings (PR #20160). |
Thanks @Donk23 ! |
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>
Two Validations for pandas.DataFrame.isna and pandas.Series.isna (shared docs).