BUG: DataFrame.to_html(index=False) with named Index rendered incorrectly · Issue #10344 · pandas-dev/pandas (original) (raw)
As below capture, index name is drawn even if index=False
is specified, and it corrupts the layout.
For copy/paste to Jupyter:
import numpy as np
import pandas as pd
from IPython.display import HTML
df = pd.DataFrame(np.random.randn(2, 2), index=pd.Index(['A', 'B'], name='idx'))
HTML(df.to_html())
HTML(df.to_html(index=False))