DOC: fix a failing doctest in DataFrame.to_dict
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Based on #22459. Fix the docstring for DataFrame.to_dict. I also updated `ci/doctests.sh`.