Skip to content

Update to_datetime usage for pandas 3.0.0 compatibility#626

Merged
ianepreston merged 1 commit intoianepreston:masterfrom
AlexSCFraser:master
Feb 12, 2026
Merged

Update to_datetime usage for pandas 3.0.0 compatibility#626
ianepreston merged 1 commit intoianepreston:masterfrom
AlexSCFraser:master

Conversation

@AlexSCFraser
Copy link
Contributor

Pandas 3.0.0 deprecates errors="ignore" in to_datetime, which makes the dataframe formatters fail. I updated it to "coerce", which will attempt to format malformed timestamps. There is also a "raise" alternative, but coerce seems closer to the intent of ignore.

pandas-dev/pandas#54467
https://pandas.pydata.org/docs/whatsnew/v3.0.0.html#deprecations

I haven't extensively tested the whole package against pandas 3.0.0, but these fixes were necessary for my usage of the basic vector and table download functions on a recent install of stats-can in a new dev environment.

Pandas 3.0.0 deprecates errors="ignore" in to_datetime, which makes the dataframe formatters fail. I updated it to "coerce", which will attempt to format malformed timestamps. There is also a "raise" alternative, but coerce seems closer to the intent of ignore.

pandas-dev/pandas#54467
https://pandas.pydata.org/docs/whatsnew/v3.0.0.html#deprecations
@ianepreston ianepreston merged commit d703c42 into ianepreston:master Feb 12, 2026
2 of 4 checks passed
@ianepreston
Copy link
Owner

makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants