pandas.io.formats.style.Styler.render¶
- Styler.render(sparse_index=None, sparse_columns=None, **kwargs)[source]¶
Render the
Stylerincluding all applied styles to HTML.Deprecated since version 1.4.0.
- Parameters
- sparse_indexbool, optional
Whether to sparsify the display of a hierarchical index. Setting to False will display each explicit level element in a hierarchical key for each row. Defaults to
pandas.options.styler.sparse.indexvalue.- sparse_columnsbool, optional
Whether to sparsify the display of a hierarchical index. Setting to False will display each explicit level element in a hierarchical key for each row. Defaults to
pandas.options.styler.sparse.columnsvalue.- **kwargs
Any additional keyword arguments are passed through to
self.template.render. This is useful when you need to provide additional variables for a custom template.
- Returns
- renderedstr
The rendered HTML.
Notes
This method is deprecated in favour of
Styler.to_html.Styler objects have defined the
_repr_html_method which automatically callsself.to_html()when it’s the last item in a Notebook cell.When calling
Styler.render()directly, wrap the result inIPython.display.HTMLto view the rendered HTML in the notebook.Pandas uses the following keys in render. Arguments passed in
**kwargstake precedence, so think carefully if you want to override them:head
cellstyle
body
uuid
table_styles
caption
table_attributes