-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Change groupby value_counts (from fall through behaviour) #6540
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
Comments
Ahem, that would be size.... |
Maybe it should be size with standard value_count options ? |
maybe just alias this related (maybe dupe) of #6312 |
Yeah I think this makes sense, I don't think most people want to do anything else (trying to think of a case when this wouldn't be desired)... I guess that's when the selected column isn't in the index... darn then it is going to be different. :s |
In the result of a groupby, the groups are the index, not the values. To me, this makes "g.value_counts()" a bit confusing. Since g.size() already gives the desired output, I personally think this should not be implemented/aliased. |
The fall through value_counts (for Series) is a bit strange, I think better result would be (with the standard options):
Can put together if people think it's good.
Note: as_index doesn't make sense here so would be ignored.
The text was updated successfully, but these errors were encountered: