If I use DataFrame.set_index, I get this result:
DataFrame.set_index
import pandas as pd df = pd.DataFrame([[\'foo\',1,3.0],[\'bar\',2,2.9], [\'
These days pandas actually has a keyword for this:
df.to_html(index_names=False)
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_html.html