Closed
Description
Styler.format
could allow a parameter raw_html
(bool, False for current behaviour), enabling richer output
For example, df.style.format(lambda s: f"<a href='https://en.wikipedia.org/wiki/{html.escape(s)}'>{html.escape(s)}</a>", raw_html=True)
could be used to turn a column of values into a column of links to English Wikipedia articles, when exported with to_html
.
To achieve this, we would need to always pass raw HTML to the jina templates, changing how formatting is currently done in Styler.to_html
.
Formats performed with raw_html=True
would have no effect on Styler.to_excel
.