-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Improved the docstring of pandas.Series.filter #20148
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 @ottiP! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on July 07, 2018 at 14:47 Hours UTC |
e9fa518
to
aa0af81
Compare
pandas/core/generic.py
Outdated
@@ -3525,46 +3525,45 @@ def filter(self, items=None, like=None, regex=None, axis=None): | |||
Parameters | |||
---------- | |||
items : list-like | |||
List of info axis to restrict to (must not all be present) | |||
List of info axis to restrict to (must not all be present). |
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.
Hmm I don't think info axis
is well known. How about "List of labels from axis
to restrict to."
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 maybe replace all other "info axis" with `axis`
pandas/core/generic.py
Outdated
one two three | ||
mouse 1 2 3 | ||
rabbit 4 5 6 | ||
>>> df = pd.DataFrame(np.array(([1,2,3],[4,5,6])), |
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.
PEP8: spaces after comma
pandas/core/generic.py
Outdated
rabbit 4 5 6 | ||
|
||
See Also | ||
-------- | ||
pandas.DataFrame.loc | ||
pandas.DataFrame.loc : Purely label-location based indexer for selection by label. |
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.
Maybe too long. Just "label-based indexer."
pandas/core/generic.py
Outdated
@@ -3794,6 +3793,19 @@ def sample(self, n=None, frac=None, replace=False, weights=None, | |||
40 0.823173 -0.078816 1.009536 1.015108 | |||
15 1.421154 -0.055301 -1.922594 -0.019696 | |||
6 -0.148339 0.832938 1.787600 -1.383767 | |||
|
|||
You can use `random state` for reproducibility: |
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 from a different PR?
5d0ea2e
to
28121ba
Compare
28121ba
to
73dad5b
Compare
Codecov Report
@@ Coverage Diff @@
## master #20148 +/- ##
=========================================
Coverage ? 91.95%
=========================================
Files ? 160
Lines ? 49817
Branches ? 0
=========================================
Hits ? 45810
Misses ? 4007
Partials ? 0
Continue to review full report at Codecov.
|
@datapythonista if you want to merge this on green. |
thanks @ottiP ! |
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):