-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: improved pivot_table(..) aggfunc parameter explanation #18718
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 @stefansimik! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on December 12, 2017 at 11:15 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #18718 +/- ##
==========================================
- Coverage 91.58% 91.57% -0.02%
==========================================
Files 153 153
Lines 51305 51307 +2
==========================================
- Hits 46989 46982 -7
- Misses 4316 4325 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18718 +/- ##
==========================================
+ Coverage 91.58% 91.59% +<.01%
==========================================
Files 153 153
Lines 51305 51364 +59
==========================================
+ Hits 46989 47047 +58
- Misses 4316 4317 +1
Continue to review full report at Codecov.
|
lgtm. @jorisvandenbossche |
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.
Small comments, for the rest looks good!
pandas/core/frame.py
Outdated
>>> table = pivot_table(df, values='D', index=['A', 'B'], | ||
... columns=['C'], aggfunc=np.sum) | ||
>>> table | ||
... # doctest: +NORMALIZE_WHITESPACE |
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.
you can remove this line (as we currently don't doctest our docstrings yet)
pandas/core/frame.py
Outdated
@@ -4413,10 +4413,12 @@ def pivot(self, index=None, columns=None, values=None): | |||
list can contain any of the other types (except list). | |||
Keys to group by on the pivot table column. If an array is passed, | |||
it is being used as the same manner as column values. | |||
aggfunc : function or list of functions, default numpy.mean | |||
aggfunc : function or list of functions or dict, default numpy.mean |
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.
'function or list of ..' -> 'function, list of ...'
@jorisvandenbossche |
pandas/core/frame.py
Outdated
... 'E': [min, max, np.mean]}) | ||
>>> table | ||
... # doctest: +NORMALIZE_WHITESPACE | ||
D E |
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 line as well.
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.
Thank you, done.
@jreback @jorisvandenbossche |
@stefansimik Yes, thanks! |
git diff upstream/master -u -- "*.py" | flake8 --diff