Usecase - I have a Styler
subclass with a new template that I want to pass some arbitrary stuff into - which currently there isn't a great way to do (right now I'm overriding and re-implementing .render()
).
Open to suggestions on the api, but I was thinking of adding template_args
argument that would be passed to the template.
from pandas.formats.style import Styler from jinja2 import Template class MyStyler(Styler): template = Template(""" .... omitted {{ my_value_1 }} """) MyStyler(df, template_args={'my_value_1': '...'}).render()
xref #11610 (master tracker)
pandas 0.19.2
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4