Skip to content

[BUG] origin and development parameters of Triangle class cannot handle lists #538

Open
@dlembke97

Description

@dlembke97

Describe the bug
The Triangle class docstring states that origin and development parameters can take str or list inputs, but it does not seem to work with lists

To Reproduce

import pandas as pd
import numpy as np
np.NINF = -np.inf
import chainladder as cl

raa_df = pd.read_csv(
    "https://raw.githubusercontent.com/casact/chainladder-python/master/chainladder/utils/data/raa.csv"
)

raa = cl.Triangle(
    raa_df,
    origin=["development", "origin"],
    development="development",
    columns="values",
    cumulative=True,
)
raa

Expected behavior
triangle object with a triangle created for both development year and origin year as development period (In theory would just be a column when development period is used for the origin parameter)

Desktop (please complete the following information):

  • Numpy Version [e.g. 2.0.1]
  • Pandas Version [e.g. 2.2.2]
  • Chainladder Version [e.g. 0.8.23]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions