CLN: Update cpython imports in Cython Code GH28382
- [x] closes #28382
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Apologies if anything is not ideal, as this is my first pull request here.  Any suggestions or comments are much appreciated!