-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: DataFrameGroupBy.value_counts fails with a TimeGrouper #50486
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
I don't know what your environment looks like, but this is what I did to investigate the problem.
If you look at the code below, it returns a TimeGrouper Class
If you use a dot notation on the response, you can group by any item from the response. e.g. When you call
Your output will be:
I hope this leads you to fixing the problem. You may look more in detail about |
Also, note that if you leave your code untouched, you can |
Thanks @AfolabiOlaoluwa - however the code in the top comment (without any modification) should not raise an error. |
I agree it shouldn't fail! It looks like If we look at "new" function under grouper.py, when
output:
Its output is not different from the solution with So, I am worried about why it looks like
|
raises
ValueError: operands could not be broadcast together with shapes (5,) (6,) (5,)
The text was updated successfully, but these errors were encountered: