You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In certain cases the skiprows callable on read_excel will loop infinitely. It's related to the sequence of True and False values coming out of the function. I've already written a unit test that triggers the issue and a fix to address it. Creating this bug to track the fix against.
Expected Behavior
The test provided above should pass, where currently it will loop forever.
To put it another way; skiprows callable should never be called with a row index that is greater than the length of the document.
Installed Versions
❯ ls bug.py | entr -c python bug.py
/Users/bram/Code/nca/pandas/pandas/compat/_optional.py:149: UserWarning: Pandas requires version '1.3.1' or newer of 'bottleneck' (version '1.2.1' currently installed).
warnings.warn(msg, UserWarning)
INSTALLED VERSIONS
commit : 04f5721
python : 3.9.9.final.0
python-bits : 64
OS : Darwin
OS-release : 21.2.0
Version : Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
In certain cases the
skiprows
callable onread_excel
will loop infinitely. It's related to the sequence ofTrue
andFalse
values coming out of the function. I've already written a unit test that triggers the issue and a fix to address it. Creating this bug to track the fix against.Expected Behavior
The test provided above should pass, where currently it will loop forever.
To put it another way;
skiprows
callable should never be called with a row index that is greater than the length of the document.Installed Versions
INSTALLED VERSIONS
commit : 04f5721
python : 3.9.9.final.0
python-bits : 64
OS : Darwin
OS-release : 21.2.0
Version : Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.5.0.dev0+130.g04f5721617
numpy : 1.22.1
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.1.0
Cython : 0.29.26
pytest : 6.2.5
hypothesis : 6.36.0
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : 1.2.1
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 2.0.1
xlwt : None
zstandard : None
The text was updated successfully, but these errors were encountered: