-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member
Description
dtstr = "2014 Jan 9 05:15 FAKE"
arg = np.array([dtstr], dtype=object)
>>> pd.core.tools.datetimes._guess_datetime_format_for_array(arg, dayfirst=None)
'%Y %b %d %H:%M FAKE'
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.
Metadata
Metadata
Assignees
Labels
BugDatetimeDatetime data dtypeDatetime data dtypeNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team member