Closed
Description
Example:
>>> df = pd.DataFrame({'a': [10, 20], 'b': [30, 40], 'c': [50, 60]},
... index=pd.MultiIndex.from_tuples([(70, 80), (90, 100)]))
>>> writer = pd.ExcelWriter('test.xls')
>>> df.to_excel(writer, sheet_name='1', index=False)
>>> writer.save()
>>> pd.read_excel('test.xls', '1')
a b c
10 30 50 NaN NaN
20 40 60 NaN NaN
The column names are obviously misplaced (erroneously shifted to the right by the number of levels in the MultiIndex). Or is it the data that is misplaced? Wonder why no one noticed this before.