BUG: Styler export() and use() no longer work after Styler has been rendered. #39735
Closed
3 tasks done
Labels
Regression
Functionality that used to work in a prior pandas version
Styler
conditional formatting using DataFrame.style
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Addressing #39396 and #39395 means that after
Styler._compute()
orStyler.render()
the_todo
list is cleared.Since
Styler.export = lambda x: Styler._todo
and
Styler.use = lambda x: Styler._todo.extend(x)
This means that exporting
styles
cannot be achieved if a Styler has been rendered at least once.Possible actions:
export
use
..ctx
object before render and keeping the_todo
list, suffering the need to recompute all applied styles on each render.Perhaps 3 is best - If performance is an issue developers should know only to every render once?
The text was updated successfully, but these errors were encountered: