MultiIndex Column Offset Bug with to_html(index=False) #8452
Labels
Bug
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Output-Formatting
__repr__ of pandas objects, to_string
Milestone
I'm trying to use to_html() to print a DataFrame that has a MultiIndex column, and I want to hide the index. When I do, the column labels are shifted right by one column. I use:
and the result is:

Seems to me to_html() isn't properly accounting for the index=False when there is a column Multindex. With single-level column index ( df.columns=list('abcd') ) it prints fine. With index=True, to_html() also works fine.
My versions are:
INSTALLED VERSIONS
commit: None
python: 2.7.8.final.0
python-bits: 64
OS: Darwin
OS-release: 13.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.14.1
nose: 1.3.3
Cython: 0.20.1
numpy: 1.9.0
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 2.1.0
sphinx: 1.2.2
patsy: 0.2.1
scikits.timeseries: None
dateutil: 2.2
pytz: 2014.7
bottleneck: None
tables: 3.1.1
numexpr: 2.3.1
matplotlib: 1.3.1
openpyxl: 1.8.5
xlrd: 0.9.3
xlwt: 0.7.5
xlsxwriter: 0.5.5
lxml: 3.3.5
bs4: 4.3.1
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: 0.9.4
pymysql: None
psycopg2: None
The text was updated successfully, but these errors were encountered: