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
Referencing #1324, it's time to define a Styler for the Triangle. A Styler is a class that enables aesthetic configuration of the Triangle for output to various displays, in HTML, LaTeX, etc. For the Pandas styler, refer to the following tutorial:
This can be accessed via Triangle.to_frame().style.format(...), but challenges remain:
The Pandas styler cannot access the actuarial elements of the Triangle, such as latest diagonal, lower triangle (see [ENH] Different background for upper and lower triangles #1324), which puts a high burden on the user to define complex, custom functions to format these elements.
No support for origin/development indexes
Concatenation
Another cool feature that we can adapt is the concatenation of stylers. For example, applying this to a Triangle(s) with a compatible table of LDFs should give us the ability to build the exhibits in Friedland, such as:
Builtin styles
The Pandas styler has builtin styles. The Triangle styler can have its own builtins, where we can format things like latest diagonal, lower triangle, upper triangle, origin, development, etc. This can be done via:
Really excited to see this coming together.
I'm working through the Friedland Chapter 12 recreation right now, and having lower triangle and diagonal styling will make those case outstanding exhibits look just like the text.
I can jump on #1334 (highlight_diagonal) right after #1342 lands.
Another multi-part issue...
Referencing #1324, it's time to define a Styler for the Triangle. A Styler is a class that enables aesthetic configuration of the Triangle for output to various displays, in HTML, LaTeX, etc. For the Pandas styler, refer to the following tutorial:
https://pandas.pydata.org/docs/user_guide/style.html
This can be accessed via
Triangle.to_frame().style.format(...), but challenges remain:Concatenation
Another cool feature that we can adapt is the concatenation of stylers. For example, applying this to a Triangle(s) with a compatible table of LDFs should give us the ability to build the exhibits in Friedland, such as:
Builtin styles
The Pandas styler has builtin styles. The
Trianglestyler can have its own builtins, where we can format things like latest diagonal, lower triangle, upper triangle, origin, development, etc. This can be done via:Which can be the result of solving #1324.