-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Error while deleting/dropping a series/dataframe entry with timezone aware timestamps. #21761
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
@elboerto : Can you try your code against |
I was able to reproduce this issue with
I would like to attempt to fix this issue, if possible. |
@gnikonorov : As I said earlier, I am (un)fortunately unable to replicate those errors. What version of import pandas as pd
pd.__version__ |
@gfyoung, I am running
|
@gnikonorov : Hmmm...that's quite weird. cc @jreback @jorisvandenbossche @TomAugspurger : Are any of you able to replicate this by any chance? |
Version >>> import pandas
>>> print(pandas.__version__)
0.24.0.dev0+237.g3273309d2 Output:
|
I'm also able to reproduce.
…On Mon, Jul 9, 2018 at 3:15 AM, elboerto ***@***.***> wrote:
Version
>>> import pandas>>> print(pandas.__version__)0.24.0.dev0+237.g3273309d2
Output:
(pandas-dev) C:\Users\Robert\Documents\Github\pandas-elboerto>python test/test_21761.py
Traceback (most recent call last):
File "test/test_21761.py", line 15, in <module>
del series[timestamp]
File "C:\Users\Robert\AppData\Local\conda\conda\envs\pandas-dev\lib\site-packages\pandas\core\generic.py", line 2740, in __delitem__
self._data.delete(key)
File "C:\Users\Robert\AppData\Local\conda\conda\envs\pandas-dev\lib\site-packages\pandas\core\internals.py", line 4785, in delete
self.axes[0] = self.axes[0].delete(loc)
File "C:\Users\Robert\AppData\Local\conda\conda\envs\pandas-dev\lib\site-packages\pandas\core\indexes\datetimes.py", line 2225, in delete
return DatetimeIndex(new_dates, name=self.name, freq=freq, tz=self.tz)
File "C:\Users\Robert\AppData\Local\conda\conda\envs\pandas-dev\lib\site-packages\pandas\core\indexes\datetimes.py", line 445, in __new__
ambiguous=ambiguous)
File "pandas/_libs/tslibs/conversion.pyx", line 977, in pandas._libs.tslibs.conversion.tz_localize_to_utc
elif is_dst:
pytz.exceptions.AmbiguousTimeError: Cannot infer dst time from '2017-10-29 02:00:00', try using the 'ambiguous' argument
``
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21761 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIuZGsGc7RYVmuV2FvcZzB5yz0goMks5uExEWgaJpZM4VFMTk>
.
|
Code Sample, a copy-pastable example if possible
Problem description
It not possible to delete/drop a series/dataframe entry with timezone aware timestamps, while accessing them is possible.
Expected Output
Deletion of the respective entry.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: