Specify that both ``by`` and ``level`` should not be specified in ``groupby`` - GH40378 
- [x] closes #40378 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Ref: https://github.com/pandas-dev/pandas/pull/47778#discussion_r923860446
Thanks for the pull request, but I believe this was addressed by https://github.com/pandas-dev/pandas/pull/47778?

Also, please fill out the pull request template to give more context to reviewers. Thanks. @mroeschke: https://github.com/pandas-dev/pandas/pull/47778#discussion_r923860446

@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: https://github.com/pandas-dev/pandas/pull/47778#discussion_r923860446 @GivyBoy - I think this looks good; can you merge main and resolve conflicts. > In the user guide we're losing the sentence
> 
> > When using `.groupby()` on a DatFrame with a MultiIndex, do not specify both `by` and `level`.
> 
> 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 