Closed
Description
-
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()
or Styler.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:
- Update the docs to make users aware of the new behaviour and suffer any regression issues for
export
use
. - Revert the original PR, suffering the duplicate CSS in HTML generated on each render.
- Solve both issues by clearing the
.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?