Weird Development Ages on Sample Dataset when using pandas 2.0.2 #439
FlawlessNa
started this conversation in
General
Replies: 1 comment
|
Thanks, I haven't yet run our test suite against pandas>=2.0. Someone also just posted issue #438 referencing the same. Sounds like there are breaking changes that need to be addressed. This issue gives me a good place to start looking. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
First of all thanks for this great package! It is extremely useful!
I recently started using the
chainladderpackage and first noticed an issue when combined withpandas2.0.2.I'm not entirely sure whether the issue arises from
pandasitself, or from the triangle creation withinchainladder. This is why I decided to ask in the discussion section first.Note: I've ran the script under both Python 3.8 and 3.11 and got the exact same results.
Here is the script I am running to outline the issue (I've tried with a random triangle sampled from "clrd" and observed the same problem as well):

If I run this script with

pandas1.5.3 (similar version used in thechainladderdocumentation), then everything goes smoothly, there are no problems with the output triangle, as below:Now if I run this script with
pandas 2.0.2, notice what happens to the Development Ages (and similarly, thedata.valuationdates end up being problematic as well)This is effectively a problem because it messes up the
cl.Development()model fit when combined with various parameters (n_periods, drop_low/high, etc).I've tried digging to find the root of the discrepancy, and it looks like it first arises in
TriangleBase._development_lagwhich is called when usingcl.load_sample.I'm not sure of the best solution but I thought somebody might be able to help!
Thanks!!
All reactions