chainladder.list_samples

Contents

chainladder.list_samples#

chainladder.list_samples(include_grain: bool = True) DataFrame[source]#

List the sample datasets bundled with the chainladder package.

The returned table is driven by the sample-dataset manifest (chainladder/utils/data/_manifest.py), the same source load_sample() reads, so it always reflects exactly what is loadable.

Parameters:
include_grain: bool

If True (default), load each sample to report its origin and development grain (and the number of origin/development periods). This is the slower path because every Triangle is built. Set to False to return just the manifest metadata (name, index, columns, cumulative) without loading any data.

Returns:
pandas.DataFrame indexed by sample name, with columns index,
columns, cumulative and, when include_grain is True,
origin_grain, development_grain, origin_periods and
development_periods.

Examples

import chainladder as cl
cl.list_samples()                    # full table, grain included
cl.list_samples(include_grain=False) # fast, metadata only