TST: GH 32431 check print label indexing on nan
- [x] closes #32431 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry --> not applicable

This is my first contribution to pandas. I added a simple test that was requested in one of the open issues.
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. thanks @wesleyboelrijk 