You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ENH] Different background for upper and lower triangles #1324
I think it's time to adapt the pandas Styler to act upon a Triangle class. We can technically access it by doing Triangle.to_frame().style, but challenges remain:
Highlighting the lower triangle (as you mentioned) without having to define a super-complicated formula, e.g., out of the box
Likewise, highlighting individual diagonals and styling other triangle components
What this means is that if we adapt the styler, we can make displays that concat Triangles with each other and on top of tables of patterns - i.e., a unified triangle/patterns exhibit, which means we could make some very slick presentations in the Friedland recreation.
Activity
genedan commentedon Sep 10, 2026
I think it's time to adapt the pandas
Stylerto act upon a Triangle class. We can technically access it by doingTriangle.to_frame().style, but challenges remain:And, check out this feature to concat stylers:
https://pandas.pydata.org/docs/user_guide/style.html#Concatenating-DataFrame-Outputs
What this means is that if we adapt the styler, we can make displays that concat Triangles with each other and on top of tables of patterns - i.e., a unified triangle/patterns exhibit, which means we could make some very slick presentations in the Friedland recreation.
henrydingliu commentedon Sep 10, 2026
thanks a ton! I'm going to use this right now in chapter 11.
i think i understand the concept. do you envision stylers to be in addition to or superseding #1281?
genedan commentedon Sep 10, 2026
Yeah I think we can close that one. It was superseded by #1309, too.