API/ENH: Styler template arguments
See original GitHub issueUsecase - 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
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Format Your Paper - APA Style (7th ed.)
This is an APA format template document in Google Docs. ... evaluate, or replicate the study or argument; Put each appendix on a...
Read more >A Template Showing How to Use APA Format
A TEMPLATE SHOWING HOW TO USE APA FORMAT. 2. Abstract. The abstract states the question the paper was designed to answer and reports...
Read more >General Format - Purdue OWL
Cite your source automatically in MLA or APA format ... APA site where you can find a complete list of all the errors...
Read more >Academic Writing Style Guide: How to Format an APA Paper
The main ones are the introduction, methods, arguments/discussions, and conclusions. Depending on the department or subject requirements, the ...
Read more >APA Style | APA Sample Papers | Excelsior Online Writing Lab
When writing an APA-style paper, sometimes a sample paper is the best reference! OWL has a collection of sample papers to help guide...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Very nice! Might be nice to wrap the subclassing into some kind of factory function to lessen the jinja2 knowledge required? Roughly
Closed by https://github.com/pandas-dev/pandas/issues/15649 (I think solved everything, just forget to close it).