-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
read_excel drops columns when reading a one row file with a MultiIndex #9208
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
Labels
Milestone
Comments
I can confirm this with 0.15.2 |
Would have to dig into it (unlikely to have time soon), but #10184 might suggest how this could be fixed, as the issues seem similar. |
gfyoung
added a commit
to forking-repos/pandas
that referenced
this issue
Nov 13, 2018
gfyoung
added a commit
that referenced
this issue
Nov 13, 2018
JustinZhengBC
pushed a commit
to JustinZhengBC/pandas
that referenced
this issue
Nov 14, 2018
tm9k1
pushed a commit
to tm9k1/pandas
that referenced
this issue
Nov 19, 2018
Pingviinituutti
pushed a commit
to Pingviinituutti/pandas
that referenced
this issue
Feb 28, 2019
Pingviinituutti
pushed a commit
to Pingviinituutti/pandas
that referenced
this issue
Feb 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm seeing the weirdest error.
When I read an .xlsx excel file with only one row (example below)...

... and try to set the
index_col
, then pandas incorrectly reads the columns:I.e. for a file with only one row, column headers A, B, C, D, E, F
Yields

(I get an index with columns A, B, C, and a dataframe with columns B, D, F - what happened to E?)
Note that if I don't use
index_col
, I get a dataframe with columns A-F as expected. Likewise, if I add a row of actual data, the dataframe loads as expected.Relevant versions:
pandas version 0.15.1 running on 2.7.7 |Anaconda 2.0.1 (64-bit)| (default, Jun 11 2014, 10:40:02) [MSC v.1500 64 bit (AMD64)]
xlrd.__VERSION__
=0.9.3The text was updated successfully, but these errors were encountered: