You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dataframe and Styler implement a .to_html function which allows using custom styles via jinja2 custom templates which can be accessed via https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.io.formats.style.Styler.from_custom_template.html
Templates exposes each cell as a dict in the format of:
I'm trying to pipe a jupyter notebook to html, then from html pandoc it to Docx. This requires being able to set a attribute=value defined as custom-style="Footnote Text", which allows Pandoc to apply a docx style.
Feature Description
Figure out how to either add attributes from the series or dataframe or implement a Styler component which adds attributes which get put into the jinja2 template. It's clear this was intended, but not implemented.
Alternative Solutions
The alternative would have me making custom templates for every table I need, rather than allowing pandoc to naturally adapt styles
Additional Context
I could probably implement this feature but it's obfuscated how the render goes from accessing a cell and putting that into a render function.
I assume it can be a mirror image of the set_table_styles function and instead but set_table_attributes unless the intention was to use the Dataframe.attrs or Series.attrs.
Either way, some clear direction could get this implemented.
The text was updated successfully, but these errors were encountered:
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
Dataframe and Styler implement a
.to_html
function which allows using custom styles via jinja2 custom templates which can be accessed viahttps://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.io.formats.style.Styler.from_custom_template.html
Templates exposes each cell as a dict in the format of:
Dataframes and Series appear to implement the necessary but ???:
Though it's not clear these are the same things.
I'm trying to pipe a jupyter notebook to html, then from html pandoc it to Docx. This requires being able to set a
attribute=value
defined ascustom-style="Footnote Text"
, which allows Pandoc to apply a docx style.Feature Description
Figure out how to either add attributes from the series or dataframe or implement a Styler component which adds attributes which get put into the jinja2 template. It's clear this was intended, but not implemented.
Alternative Solutions
The alternative would have me making custom templates for every table I need, rather than allowing pandoc to naturally adapt styles
Additional Context
I could probably implement this feature but it's obfuscated how the render goes from accessing a cell and putting that into a render function.
I assume it can be a mirror image of the
set_table_styles
function and instead butset_table_attributes
unless the intention was to use theDataframe.attrs
orSeries.attrs
.Either way, some clear direction could get this implemented.
The text was updated successfully, but these errors were encountered: