DOC: Fix GL01 and GL02 errors in the docstrings
- [x] closes #27986
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Fixed docstrings text that aren’t on the next line after opening `"""` and followed immediately by the line with closing `"""`. Issue #27986