-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: unify error message when parsing datetimes with mixed time zones with utc=False #57653
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
CLN: unify error message when parsing datetimes with mixed time zones with utc=False #57653
Conversation
pandas/_libs/tslib.pyx
Outdated
@@ -598,7 +598,8 @@ cpdef array_to_datetime( | |||
is_same_offsets = len(out_tzoffset_vals) == 1 | |||
if not is_same_offsets: | |||
raise ValueError( | |||
"cannot parse datetimes with mixed time zones unless `utc=True`" | |||
"Mixed timezones detected. pass utc=True in to_datetime " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mixed timezones detected. pass utc=True in to_datetime " | |
"Mixed timezones detected. Pass utc=True in to_datetime " |
And could you capitalize elsewhere too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for reviewing this PR. I capitalized the letter 'p'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one, thanks!
Thanks @natmokval |
… with utc=False (pandas-dev#57653) * unify error msg for mixed offsets when utc=False * capitalize the letter p in error message
xref #57275, #55793
unified ValueError message when parsing datetimes with mixed time zones with utc=False
so far we get two different ValueError messages: