Skip to content

Commit 96ba717

Browse files
authored
DOC: Changed from_custom_template example (#54374)
* Correcting from_custom_template example * Styler example * added # doctest skip
1 parent d208d64 commit 96ba717

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

pandas/io/formats/style.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -3602,13 +3602,12 @@ def from_custom_template(
36023602
36033603
Examples
36043604
--------
3605-
>>> from pandas.io.formats.style import Styler # doctest: +SKIP
3606-
>>> from IPython.display import HTML # doctest: +SKIP
3607-
>>> df = pd.DataFrame({"A": [1, 2]}) # doctest: +SKIP
3608-
>>> path = "path/to/template" # doctest: +SKIP
3609-
>>> file = "template.tpl" # doctest: +SKIP
3610-
>>> EasyStyler = Styler.from_custom_template(path, file) # doctest: +SKIP
3611-
>>> HTML(EasyStyler(df).to_html(table_title="Another Title")) # doctest: +SKIP
3605+
>>> from pandas.io.formats.style import Styler
3606+
>>> EasyStyler = Styler.from_custom_template("path/to/template",
3607+
... "template.tpl",
3608+
... ) # doctest: +SKIP
3609+
>>> df = pd.DataFrame({"A": [1, 2]})
3610+
>>> EasyStyler(df) # doctest: +SKIP
36123611
36133612
Please see:
36143613
`Table Visualization <../../user_guide/style.ipynb>`_ for more examples.

0 commit comments

Comments
 (0)