-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: AmbiguousTimeError when using date_range even when argument ambiguous is set #35297
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
Confirming that this exists on pandas 1.1 master Output of pd.show_versions()INSTALLED VERSIONScommit : 54db0b2 pandas : 1.1.0.dev0+2130.g54db0b2c7 |
@aleisun Well spotted! Passing ambigious in lines 421 and 423 of |
I know that this is issue is closed. But the fact that this bug was reported with such precision, and was resolved swiftly, saved my work day, two years down the line, on a Friday. Just wanted to remind that open source collaboration makes the world a better place in ways that we do not see day to day. |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
When the start time is at the day light saving ambiguous time, date_range raises errors even when the argument 'ambiguous' is set. It should not be raising error when the argument is set.
Issue could be due to the line
pandas/pandas/core/arrays/datetimes.py
Line 421 in 32ed15d
does not correctly pass the argument ambiguous to the function
tz_localize()
.Expected Output
No error
Output of
pd.show_versions()
AmbiguousTimeError: Cannot infer dst time from 2020-11-01 01:00:00, try using the 'ambiguous' argument
The text was updated successfully, but these errors were encountered: