CLN: Use ABC classes for isinstance checks, remove unnecessary imports
Per #27353 changed ``isinstance`` checks listed in the @WillAyd script to use ABCs where it enabled removal of imports only. 

Note there may be additional files which can be cleaned as the script does not parse multi-line statements.

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