Factory function for creating a subclass of Styler.
Uses custom templates and Jinja environment.
Changed in version 1.3.0.
Path or paths of directories containing the templates.
Name of your custom template to replace the html_table template.
Added in version 1.3.0.
Name of your custom template to replace the html_style template.
Added in version 1.3.0.
Has the correct env,``template_html``, template_html_table and template_html_style class attributes set.
Examples
>>> from pandas.io.formats.style import Styler
>>> EasyStyler = Styler.from_custom_template("path/to/template",
... "template.tpl",
... )
>>> df = pd.DataFrame({"A": [1, 2]})
>>> EasyStyler(df)
Please see: Table Visualization for more examples.
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.io.formats.style.Styler.from_custom_template.html