Closed
Description
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
pandas.read_excel(filename, 'Sheet1', index_col=['A', 'B', 'C'])
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.3