Skip to content

BUG: read_excel: incorrect multi-index values - 2 #34673

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

Closed
2 of 3 tasks
kuraga opened this issue Jun 9, 2020 · 0 comments · Fixed by #38517
Closed
2 of 3 tasks

BUG: read_excel: incorrect multi-index values - 2 #34673

kuraga opened this issue Jun 9, 2020 · 0 comments · Fixed by #38517
Labels
Bug IO Excel read_excel, to_excel
Milestone

Comments

@kuraga
Copy link

kuraga commented Jun 9, 2020

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Code Sample, a copy-pastable example

import pandas as pd
df = pd.read_excel('test.xlsx', header=[0, 1], index_col=[0, 1])
print(df.index)

(engine could be xlrd or openpyxl, doesn't matter.)

test.xlsx
image

Problem description

MultiIndex([('x', 'B')],
           names=['A', 'B'])

Expected Output

MultiIndex([('x', None)],
           names=['A', 'B'])

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.7.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.42-calculate
machine : x86_64
processor : Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
byteorder : little
LC_ALL : None
LANG : ru_RU.utf8
LOCALE : ru_RU.UTF-8

pandas : 1.0.3
numpy : 1.18.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.0.2
setuptools : 46.4.0.post20200518
Cython : 0.29.17
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : 1.2.8
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.13.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : 1.2.0
xlwt : None
xlsxwriter : 1.2.8
numba : None

@kuraga kuraga added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 9, 2020
@kuraga kuraga changed the title BUG: read_excel: incorrect multi-index values BUG: read_excel: incorrect multi-index values - 1 Jun 9, 2020
@kuraga kuraga changed the title BUG: read_excel: incorrect multi-index values - 1 BUG: read_excel: incorrect multi-index values - 2 Jun 9, 2020
@jbrockmendel jbrockmendel added IO Excel read_excel, to_excel and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Jun 11, 2020
@jreback jreback added this to the 1.3 milestone Dec 31, 2020
gfyoung pushed a commit that referenced this issue Jan 1, 2021
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this issue Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants