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!
@WillAyd Looks like merging master resolved the CI issues! LGTM.  Should we add a code check for this? > Should we add a code check for this?

Not against it if someone wants to take that up, but don't think needs to be done as part of this PR Thanks @amunch - great first PR