rmats.style.Styler.set_uuid ](pandas.io.formats.style.Styler.set_uuid.html)
    * [ pandas.io.formats.style.Styler.clear ](pandas.io.formats.style.Styler.clear.html)
    * [ pandas.io.formats.style.Styler.pipe ](pandas.io.formats.style.Styler.pipe.html)
    * [ pandas.io.formats.style.Styler.highlight_null ](pandas.io.formats.style.Styler.highlight_null.html)
    * [ pandas.io.formats.style.Styler.highlight_max ](pandas.io.formats.style.Styler.highlight_max.html)
    * [ pandas.io.formats.style.Styler.highlight_min ](pandas.io.formats.style.Styler.highlight_min.html)
    * [ pandas.io.formats.style.Styler.highlight_between ](pandas.io.formats.style.Styler.highlight_between.html)
    * [ pandas.io.formats.style.Styler.highlight_quantile ](pandas.io.formats.style.Styler.highlight_quantile.html)
    * [ pandas.io.formats.style.Styler.background_gradient ](pandas.io.formats.style.Styler.background_gradient.html)
    * [ pandas.io.formats.style.Styler.text_gradient ](pandas.io.formats.style.Styler.text_gradient.html)
    * [ pandas.io.formats.style.Styler.bar ](pandas.io.formats.style.Styler.bar.html)
    * [ pandas.io.formats.style.Styler.to_html ](pandas.io.formats.style.Styler.to_html.html)
    * [ pandas.io.formats.style.Styler.to_latex ](pandas.io.formats.style.Styler.to_latex.html)
    * [ pandas.io.formats.style.Styler.to_excel ](pandas.io.formats.style.Styler.to_excel.html)
    * [ pandas.io.formats.style.Styler.to_string ](pandas.io.formats.style.Styler.to_string.html)
    * [ pandas.io.formats.style.Styler.export ](pandas.io.formats.style.Styler.export.html)
    * [ pandas.io.formats.style.Styler.use ](pandas.io.formats.style.Styler.use.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ Style ](../style.html)
  * pandas.io.fo... 

#  pandas.io.formats.style.Styler.from_custom_template  #

_ classmethod  _ Styler.  from_custom_template  (  _ searchpath  _ , _
html_table  =  None  _ , _ html_style  =  None  _ )  [ [source]
](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/io/formats/style.py#L3557-L3615) #

    

Factory function for creating a subclass of ` Styler  ` .

Uses custom templates and Jinja environment.

Changed in version 1.3.0.

Parameters  :

    

**searchpath** str or list

    

Path or paths of directories containing the templates.

**html_table** str

    

Name of your custom template to replace the html_table template.

New in version 1.3.0.

**html_style** str

    

Name of your custom template to replace the html_style template.

New in version 1.3.0.

Returns  :

    

**MyStyler** subclass of Styler

    

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  ](../../user_guide/style.html) for more
examples.

[ __ previous  pandas.io.formats.style.Styler
](pandas.io.formats.style.Styler.html "previous page") [ next
pandas.io.formats.style.Styler.env  __
](pandas.io.formats.style.Styler.env.html "next page")

__ On this page

  * ` Styler.from_custom_template()  `

[ __ Show Source
](../../_sources/reference/api/pandas.io.formats.style.Styler.from_custom_template.rst.txt)

© 2024, pandas via [ NumFOCUS, Inc. ](https://numfocus.org) Hosted by [
OVHcloud ](https://www.ovhcloud.com) .

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.6.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index