Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dlembke97 opened this issue Jul 26, 2024 · 0 comments
Assignees
Labels

Comments

@dlembke97
Copy link

dlembke97 commented Jul 26, 2024

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants