CLN/BUG: Clean/Simplify _wrap_applied_output
- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

First part of #35412. I could not find a relevant issue for the test change/whatsnew update.