Skip to content

Importing Data #316

Answered by jbogaardt
Obalus2022 asked this question in Q&A
Jul 26, 2022 · 4 comments · 6 replies
Discussion options

You must be logged in to vote

No, I do not suggest you convert your data to a string. Let's look instead at the difference in the code (chainladder syntax only) with expanded commentary:

(
    triangle[triangle['RiskCode']=='ARP']['PDLALAE'] # Filters for some index and column, Fine
     .sum(axis='index') # Deliberately summing the index axis. If there is only one index .e.g. ARP, this is unnecessary.
     .incr_to_cum() # This method takes our incremental triangle and makes it cumulative which is what I think you want.
)

Your original code with commentary:

(
    triangle[triangle['RiskCode']=='ARP']['PDLALAE'] # Filters for some index and column, Fine
        .sum() # No axis is specified in sum, so this sums the or…

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@Obalus2022
Comment options

Comment options

You must be logged in to vote
1 reply
@Obalus2022
Comment options

Comment options

You must be logged in to vote
1 reply
@Obalus2022
Comment options

Comment options

You must be logged in to vote
3 replies
@Obalus2022
Comment options

@Obalus2022
Comment options

@jbogaardt
Comment options

Answer selected by Obalus2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants