Skip to content

table_conversion='matplotlib' and set_table_styles #106

Description

@florentcomte

Hi,

I created a table with a style and I tried to export in png with the conversion = 'matplotlib'. Unfortunately, I do not see the style in my png.

Thank you for your help.

Here is my code:

import dataframe_image as dfi
import pandas as pd
import numpy as np
col_headers = {
"selector": ".col_heading, thead",
"props": "color: white; background-color: #1d5632; \
font-size: 11px"
}
df = pd.DataFrame(np.random.rand(6, 4))
df_styled = df.style.set_table_styles(styles)
dfi.export(df_styled, 'df_styled.png', table_conversion='matplotlib')

Exported png:
df_styled

df_styled in Jupyter:
Capture d’écran 2023-10-25 à 12 59 15

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions