REF: Avoid importing xlrd
- [x] closes #56692 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Not sure how I'd add a test here.
Could check sys.modules for presence of xlrd? > Could check sys.modules for presence of xlrd?

True; since that's global I think it'd have to check it in a subprocess. It seems to me a bit of an odd thing to test - unless we think we should have more testing that we don't import an optional dependency if it's not used more generally. Are we okay foregoing a test here? Fine by me

On Mon, Mar 4, 2024 at 1:55 PM Richard Shadrach ***@***.***>
wrote:

> Could check sys.modules for presence of xlrd?
>
> True; since that's global I think it'd have to check it in a subprocess.
> It seems to me a bit of an odd thing to test - unless we think we should
> have more testing that we don't import an optional dependency if it's not
> used more generally. Are we okay foregoing a test here?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/57708#issuecomment-1977529179>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB5UM6HDBJRPX334VW46JMLYWTUTPAVCNFSM6AAAAABEDK5ATGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXGUZDSMJXHE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
 Thanks @rhshadrach 