Skip to content

BUG: DataFrame.to_html(index=False) with named Index rendered incorrectly #10344

Closed
@sinhrks

Description

@sinhrks

As below capture, index name is drawn even if index=False is specified, and it corrupts the layout.

2015-06-13 11 47 56

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO HTMLread_html, to_html, Styler.apply, Styler.applymapOutput-Formatting__repr__ of pandas objects, to_string

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions