BUG: Fix to_string output when using header keyword arg (#16718)
Also affects to_latex midrule position

- [x] closes #16718
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Fixes the 4th example in the above issue.