W3cubDocs

/pandas 0.25

pandas.io.formats.style.Styler.render

Styler.render(self, **kwargs) [source]

Render the built up styles to HTML.

Parameters:
**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.

New in version 0.20.

Returns:
rendered : str

The rendered HTML.

Notes

Styler objects have defined the _repr_html_ method which automatically calls self.render() when it’s the last item in a Notebook cell. When calling Styler.render() directly, wrap the result in IPython.display.HTML to view the rendered HTML in the notebook.

Pandas uses the following keys in render. Arguments passed in **kwargs take precedence, so think carefully if you want to override them:

  • head
  • cellstyle
  • body
  • uuid
  • precision
  • table_styles
  • caption
  • table_attributes

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.io.formats.style.Styler.render.html