TableBuilder#

TableBuilder provides a fluent interface for constructing custom actuarial tables programmatically from raw decrement arrays and saving them as .ltk files with automatic metadata validation and SHA-256 integrity hashing.

Supported decrement types:

Array

Symbol

Table type

qx_m / qx_f / qx_u

\(q_x\)

Mortality (LifeTable)

ix_m / ix_f / ix_u

\(i_x\)

Disability inception rate (DisabilityTable)

ox_m / ox_f / ox_u

\(o_x\)

Exit / lapse rate (ExitTable)

Generational tables additionally require improvement rate columns (mi_m, mi_f, and/or mi_u).

See also

Building Custom Table Files (.ltk) — Step-by-step guide to building custom tables.
Table Taxonomy — Overview of table types and column conventions.

read_table#

Lightweight function for loading a .ltk file without building a full TableBuilder instance. Returns a (pl.DataFrame, dict) pair — a Polars DataFrame with the table data and a dict of normalised metadata — and supports both strict integrity-checking mode and best-effort recovery mode.