resdata
resdata copied to clipboard
Circumvent Pandas bugs for years > 2262
Issue #802
Approach
Pandas is very eager to convert numpy datetime64[*] timestamps to datetime64[ns], and will error hard if a datetime64[ms] timestamp is beyond year 2262. Avoid this by giving Pandas datetime.datetime objects instead
Can one of the admins verify this patch?
Related to https://github.com/pandas-dev/pandas/issues/39727
Can you write a unit test that tests that this does the right thing and also that existing user code doesn't break with this change? Thanks.
Can you write a unit test that tests that this does the right thing and also that existing user code doesn't break with this change? Thanks.
Not sure I dare to touch the test-code in here. Identical codelines are tested in ecl2df
:
https://github.com/equinor/ecl2df/pull/267
The pandas issue was closed (as fixed) 2 weeks ago, https://github.com/pandas-dev/pandas/issues/39727, is this still relevant for us?
I guess it is relevant until we have Pandas 2.0 (not released) in our stable environment, which is hard to predict when is feasible.
@berland cam you take a look at this PR? Tests are not running and it seems to need a rebase main.