We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
df = pd.read_excel(file, header=[0, 2], index_col=[0, 1]) # Sample contents for excel file: # ,Name1,A1,B1 # ,,, # ,Name2,A2,B2 # IndexA,IndexB,, # ,IB0,0.98,3.68 # IA1,IB1,1.04,-0.04 # IA2,IB2,0.49,0.73
read_excel can't handle correctly lots of edge cases.
For instance:
header=[0,2]
I am submitting a pull request with tests showing some of those issues and a patch. This bug report is for reference.
Any combination of arguments should be supported or otherwise the function must fail telling the user what is the unsupported combination.
pandas : 3.0.0.dev0+1053.g272e69ceaf numpy : 1.26.4 pytz : 2024.1 dateutil : 2.9.0.post0 setuptools : 69.5.1 pip : 24.0 Cython : 3.0.10 pytest : 8.2.0 hypothesis : 6.102.4 sphinx : 7.3.7 blosc : None feather : None xlsxwriter : 3.2.0 lxml.etree : 5.2.2 html5lib : 1.1 pymysql : 1.4.6 psycopg2 : 2.9.9 jinja2 : 3.1.4 IPython : 8.23.0 pandas_datareader : None adbc-driver-postgresql: None adbc-driver-sqlite : None bs4 : 4.12.3 bottleneck : 1.3.8 fastparquet : 2024.2.0 fsspec : 2024.5.0 gcsfs : 2024.5.0 matplotlib : 3.9.0 numba : 0.59.1 numexpr : 2.10.0 odfpy : None openpyxl : 3.1.2 pyarrow : 16.1.0 pyreadstat : 1.2.7 python-calamine : None pyxlsb : 1.0.10 s3fs : 2024.5.0 scipy : 1.13.0 sqlalchemy : 2.0.29 tables : 3.9.2 tabulate : 0.9.0 xarray : 2024.5.0 xlrd : 2.0.1 zstandard : 0.22.0 tzdata : 2024.1 qtpy : 2.4.1 pyqt5 : None
The text was updated successfully, but these errors were encountered:
Update whatsnew
cb5a474
Bug pandas-dev#58898 has been fixed.
Successfully merging a pull request may close this issue.
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
read_excel can't handle correctly lots of edge cases.
For instance:
header=[0,2]
) and index_col, may fail to parse index names.I am submitting a pull request with tests showing some of those issues and a patch. This bug report is for reference.
Expected Behavior
Any combination of arguments should be supported or otherwise the function must fail telling the user what is the unsupported combination.
Installed Versions
pandas : 3.0.0.dev0+1053.g272e69ceaf
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : 69.5.1
pip : 24.0
Cython : 3.0.10
pytest : 8.2.0
hypothesis : 6.102.4
sphinx : 7.3.7
blosc : None
feather : None
xlsxwriter : 3.2.0
lxml.etree : 5.2.2
html5lib : 1.1
pymysql : 1.4.6
psycopg2 : 2.9.9
jinja2 : 3.1.4
IPython : 8.23.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
bottleneck : 1.3.8
fastparquet : 2024.2.0
fsspec : 2024.5.0
gcsfs : 2024.5.0
matplotlib : 3.9.0
numba : 0.59.1
numexpr : 2.10.0
odfpy : None
openpyxl : 3.1.2
pyarrow : 16.1.0
pyreadstat : 1.2.7
python-calamine : None
pyxlsb : 1.0.10
s3fs : 2024.5.0
scipy : 1.13.0
sqlalchemy : 2.0.29
tables : 3.9.2
tabulate : 0.9.0
xarray : 2024.5.0
xlrd : 2.0.1
zstandard : 0.22.0
tzdata : 2024.1
qtpy : 2.4.1
pyqt5 : None
The text was updated successfully, but these errors were encountered: