Fixes Issues#44132, #40148, #29033, #22275, #18869: groupby
- [x] closes #44132
- [x] closes #40148 
- [x] closes #29033
- [x] closes #22275
- [x] closes #18869
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [ ] whatsnew entry
