ENH: write Styler rendered output to file · Issue #13379 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
I was answering a question on conditional formatting of html on SO.
So the OP was using to_html
but wanted conditional formatting. Therefore, I pointed to Styler
to do this more easily than using the formatters
argument in to_html
, but when you have a Styler
object, there is no longer a to_html
method to write the result to a html file.
Of course you can write the result of render
manually to a file, but would this ability be a desired enhancement?
- Maybe we can add a
to_file
method toStyler
? (to_html
seems a bit specific, if we also want to use the Styler for other formats such as latex in the future) - Alternatively, we could add a
style
option into_html
where you can pass a Styler object?
Related to #11610