-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
ENH: Implement DataFrame.value_counts #31247
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
WillAyd left a comment
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.
some minor nits on annotations but otherwise lgtm
Co-Authored-By: William Ayd <william.ayd@icloud.com>
Co-Authored-By: William Ayd <william.ayd@icloud.com>
pandas/core/frame.py Outdated
| if subset is None: | ||
| subset = self.columns.tolist() | ||
| | ||
| # Some features not supported yet |
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 would remove these args then
jreback left a comment
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.
cc @pandas-dev/pandas-core if any comments
pandas/core/frame.py Outdated
| .. versionadded:: 1.1.0 | ||
| The returned Series will have a MultiIndex with one level per input |
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.
These should go in Notes
| also pls merge master |
jreback left a comment
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, ping on green.
| @@ -0,0 +1,102 @@ | |||
| import numpy as np | |||
| | |||
| import pandas as pd | |||
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.
move to the methods/ subdir
| Getting some seemingly unrelated test failures from |
| @jreback Green after the CI fixes, thanks for the review |
| thanks @dsaxton very nice! |
black pandasThis is picking up where #27350 left off because I think it'd be a nice feature to have. At least one thing that still needs to be done is implementing
binswhen we have only a single column insubset, in which case maybe we can just delegate toSeries.value_counts.