CLN GH22873 Replace base excepts in pandas/core
This cleaning fix adds specific exception classes to bare except statements to correct PEP8 linting errors. The classes were chosen by a mixture of educated guessing (i.e. if a statement gets the `length` property, it might raise an `AttributeError`), trying out functions on known edge cases (i.e. giving a datetime input that is too large gives `tslibs.OutOfBoundsDatetime`), and inspecting functions in the `try` block to see what kind of errors they raise.

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