-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DataFrameGroupBy.nunique fails with categorical, multiple groupings, and as_index=False #52848
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
This looks a bit hard, but I'll give it a try. If I won't be able to solve this within a week, I'll re-assign |
take |
Commenting out lines 1911-1913 solves issue. File:
Gonna work on fixing it now. |
Weirdly, It's the same function causing the issue as in #52397 that I'm working on The name of function: |
Is it okay if I force as_index = True using With as_index=True forced, the output would always look like this:
I assume we want the behaviour to differ depending on as_index, but wanted to double check |
Correct. Running the OP example without categorical data produces:
|
Hey, I'm sorry but I'll need to drop this issue. Pandas is a bit too much for me right now, I'll come back to this in the future |
raises
ValueError: Length of values (3) does not match length of index (4)
The text was updated successfully, but these errors were encountered: