Skip to content

Pandas .style not compatible with html reports #2513

@a0th

Description

@a0th

Bug description

Consider the test.ipynb jupyter file as:

#%%

import pandas as pd

x = pd.DataFrame({"a": [1.1, 2, 3], "b": [4, 5, 6]})
x

#%%

x.style.format('{:.0f}')

In jupyterlab, exporting as html has this as result.
ss
:

By running quarto render test.ipynb --to html, the first table is properly formatted, but the second, which comes from the style method, is broken:
ss

Jupyter lab version: 3.4.4
nbconvert version: 6.5.0
Ubuntu 22.04.1 LTS

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingthird-partyIssues involving interaction with a third-party library

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions