Skip to content

Conversation

GivyBoy
Copy link
Contributor

@GivyBoy GivyBoy commented Jul 18, 2022

@mroeschke mroeschke added this to the 1.5 milestone Jul 18, 2022
@mroeschke mroeschke merged commit 833ef31 into pandas-dev:main Jul 18, 2022
@mroeschke
Copy link
Member

Thanks @GivyBoy

More on the ``sum`` function and aggregation later.

When using ``.groupby()`` on a DatFrame with a MultiIndex, do not specify both ``by`` and ``level``.
The argument validation should be done in ``.groupby()``, using the name of the specific index.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last line here is coming from #40378 (comment). I was stating that the pandas code should validate the arguments, I don't understand what this sentence means in the documentation.

Also, I think this should be specified in the API docs for Series/DataFrame.groupby too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for the comments. I have submitted a new pull request (#47825). Feel free to look at the code. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: TypeError when trying to group on column name and index level at the same time
3 participants