BUG: Styler
subclassing and from_custom_template
no longer working
#42053
Labels
Bug
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Regression
Functionality that used to work in a prior pandas version
Styler
conditional formatting using DataFrame.style
Milestone
PR #40312 introduced jinja2 template inheritance for the styler HTML parsing.
Essentially we went from a structure like:
to
The problem with that is that Styler offers (and documents) the ability to subclass it and extend the main template so that defined blocks can be overwritten.
In jinja2 the
included
blocks of an extended template cannot be overwritten.Hence a patch is to point the docs to extending the
sub
templates instead, and amending thefrom_custom_template
method to amend each sub template instead of the main.This fixes all functionality but is not backwards compatible becuase of the arg change.
The text was updated successfully, but these errors were encountered: