Skip to content

Copying HTML table to spreadsheet software loses top left cell #12147

Closed
@pwaller

Description

@pwaller

Right now, if you copy the HTML table representation of a DataFrame from Jupyter to Google Sheets or Open office Calc, you lose the top left empty cell (and the top left cell gets the first column name, which is incorrect).

Inserting an   into that cell prevents this from happening. Would a PR be accepted which did this?

One way of achieving this is to set BLANK_VALUE to  . In Google documents then, the pasted cell is present but empty. In open office, the resulting cell has a single space in it (which seems OK).

I don't know what the wider implications of setting BLANK_VALUE are - I just want to set the upper left portion of the table so that the heading is correctly aligned when I copy the table. So maybe there is a better way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO HTMLread_html, to_html, Styler.apply, Styler.applymapOutput-Formatting__repr__ of pandas objects, to_stringStylerconditional formatting using DataFrame.style

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions