Skip to content

ENH: write Styler rendered output to file #13379

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

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 to Styler? (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 in to_html where you can pass a Styler object?

Related to #11610

@TomAugspurger

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIO HTMLread_html, to_html, Styler.apply, Styler.applymapStylerconditional formatting using DataFrame.style

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions