-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: TypeError when trying to group on column name and index level at the same time #40378
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
Doing
each line produces the same output, so while the groupby construction works, the result is not correct. I don't see a compelling reason this should be supported. Instead, it seems to me the docstring should be updated to specify that both |
Can this issue be assigned to me? I have already started to work on it. Thanks! |
…e ``groupby`` function (pandas-dev#40378)
…roupby`` - GH40378 (pandas-dev#47825) Added that ``level`` and ``by`` should not be specified when using the ``groupby`` function (pandas-dev#40378)
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Traceback
Problem description
Getting a TypeError when specifying
by
andlevel
params in.groupby()
at the same time. It seems that grouping on column name and index level is supported since there is no error when level name is located inby
parameter, so specifying it withlevel
should also be possible.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: