-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pd.read_excel with engine "xlrd" fails when a cell contains NaN/inf #54564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
pandas does not vendor xlrd, xlrd is no longer maintained. That is why you can't report issues to xlrd. |
That's what I though. With the expression "pandas vendors xlrd" I meant that |
I believe you are using the word correctly. pandas does not do that. If you do not have xlrd installed, you cannot use the xlrd engine with pandas. pandas/pandas/io/excel/_xlrd.py Lines 42 to 44 in 203f483
|
Huh. I obviously never read the file completely and just assumed the |
Pandas version checks
Reproducible Example
Issue Description
Note that a very similar issue was reported previously: #33853.
However, that one relaed to the
openpyxl
engine and was thus closed as to be fixed upstream.It appears that pandas does however vendor
xlrd
(and there is no issue tracker on the xlrd repo), so I believe this issue belongs here.pd.read_excel
withengine="xlrd"
(as required to readxls
files) fails when the input document contains infinity values:Expected Behavior
pd.read_excel
should succeed.Installed Versions
INSTALLED VERSIONS
commit : 0f43794
python : 3.11.3.final.0
python-bits : 64
OS : Darwin
OS-release : 22.5.0
Version : Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : de_CH.UTF-8
LANG : en_GB.UTF-8
LOCALE : de_CH.UTF-8
pandas : 2.0.3
numpy : 1.23.5
pytz : 2023.3
dateutil : 2.8.2
setuptools : 65.5.0
pip : 23.1.2
Cython : 0.29.34
pytest : 7.3.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 3.1.2
lxml.etree : None
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.12.0
pandas_datareader: None
bs4 : 4.12.2
bottleneck : None
brotli : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.7.1
numba : 0.57.0
numexpr : 2.8.4
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 11.0.0
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.10.1
snappy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : 2023.4.2
xlrd : 2.0.1
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: