BUG: Incomplete Styler copy methods fix (#39708) by rlukevie · Pull Request #39975 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I have never had use to copy a Styler. But I can see a use case where, in a notebook or report, you might have a dataframe that has some preliminary, shared styling and then some divergence where you highlight different properties as part of a narrative.
I think, off the top of my head, in this scenario you would need a deepcopy to prevent any updates from intermingling with each other, since much of the core styling I think comes from the attributes where the shallow copy will have only single shared pointed reference.