-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Specify that both by
and level
should not be specified in groupby
- GH40378
#47825
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
Conversation
Thanks for the pull request, but I believe this was addressed by #47778? Also, please fill out the pull request template to give more context to reviewers. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs change looks good. As mentioned in #40378 (comment), I think we should also be raising an error when both by and level are specified. If you'd like to address that here, I'd be +1. Not doing so is also okay - we can have it addressed in a separate PR.
@GivyBoy: When doing a PR that is following up from a conversation, it's helpful for reviews today as well as developers way in the future to reference it in the OP. So I would recommend adding here: Ref: #47778 (comment) |
@GivyBoy - I think this looks good; can you merge main and resolve conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the merge restored the line
The argument validation should be done in ``.groupby()``, using the name of the specific index.
This is the one that should be removed.
10debf4
to
b4b0f39
Compare
…e ``groupby`` function (pandas-dev#40378)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the user guide we're losing the sentence
When using
.groupby()
on a DatFrame with a MultiIndex, do not specify bothby
andlevel
.
But I think that's okay (API docs seems sufficient to me). @mroeschke - thoughts?
Yeah I think that's fine. Generally I favor things in the API docs over the user guide as I'm guessing the API docs get more visibility. |
Thanks @GivyBoy |
…roupby`` - GH40378 (pandas-dev#47825) Added that ``level`` and ``by`` should not be specified when using the ``groupby`` function (pandas-dev#40378)
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Ref: #47778 (comment)