Fix type annotation in pandas. version
Also remove this module from `mypy.ini`

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