I have a python script which reads a number of Excel files (.xlsx) with no issue, thus:
df_file1 = pd.read_excel(myfile1, mysheet)
However, I then tried to read another similar file using similar code and received a dependency error:
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
The environment I'm working in is quite locked down and I'm not sure I can install xlrd. I can't see anything that makes this particular file different to the files I've previously loaded. It was originally a .xlsb that I re-saved as a .xlsx (because, similarly, I can't install pyxlsb). However, other files I have successfully opened were similarly converted.
I'm wondering what might be different about a particular file that would require xlrd to open it when other similar files do not.
(I don't believe this is a duplicate of other similar questions about xlrd dependency as this is about determining what criteria require xlrd for a particular file)