-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: inferring incorrect datetime format #51476
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
Comments
Hey, it looks right to me. stdlib at least is an agreement: In [78]: dt.datetime.strptime("2014 Jan 9 05:15 FAKE", '%Y %b %d %H:%M FAKE')
Out[78]: datetime.datetime(2014, 1, 9, 5, 15) |
Thanks for taking a look. So if the inference result itself isn't the issue, how would you suggest deprecating silently-ignoring FAKE? |
All I can think of at the moment would be that dateutil (which we use to infer formats) should raise on such input Either that, or that we move away from dateutil and do our own inference entirely, which would raise in such cases. I think this would be my preferred option |
In #51477 i changed our dateutil wrapper to deprecate silent-dropping. is there somewhere we could reuse that instead of calling dateutil directly? |
I'll take a look |
Because _guess_datetime_format_for_array keeps "FAKE", to_datetime then goes through _array_strptime_with_fallback, which drops the bad tz completely.
Not sure exactly where to catch this, but need to handle it somewhere in order to deprecate #18702.
cc @MarcoGorelli
The text was updated successfully, but these errors were encountered: