You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---------------------------------------------------------------------------
AmbiguousTimeError Traceback (most recent call last)
/usr/lib/python3.5/site-packages/pandas/core/series.py in _make_dt_accessor(self)
2639 try:
-> 2640 return maybe_to_datetimelike(self)
2641 except Exception:
/usr/lib/python3.5/site-packages/pandas/tseries/common.py in maybe_to_datetimelike(data, copy)
48 if is_datetime64_dtype(data.dtype) or is_datetime64tz_dtype(data.dtype):
---> 49 return DatetimeProperties(DatetimeIndex(data, copy=copy, freq='infer'), index, name=data.name)
50 elif is_timedelta64_dtype(data.dtype):
/usr/lib/python3.5/site-packages/pandas/util/decorators.py in wrapper(*args, **kwargs)
88 kwargs[new_arg_name] = new_arg_value
---> 89 return func(*args, **kwargs)
90 return wrapper
/usr/lib/python3.5/site-packages/pandas/tseries/index.py in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, closed, ambiguous, dtype, **kwargs)
343 subarr = tslib.tz_localize_to_utc(ints, tz,
--> 344 ambiguous=ambiguous)
345
pandas/tslib.pyx in pandas.tslib.tz_localize_to_utc (pandas/tslib.c:64516)()
AmbiguousTimeError: Cannot infer dst time from Timestamp('2015-11-01 01:00:00'), try using the 'ambiguous' argument
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-2-eb75730cd6fc> in <module>()
----> 1 t.dt.tz_convert('UTC')
/usr/lib/python3.5/site-packages/pandas/core/generic.py in __getattr__(self, name)
2239 or name in self._metadata
2240 or name in self._accessors):
-> 2241 return object.__getattribute__(self, name)
2242 else:
2243 if name in self._info_axis:
/usr/lib/python3.5/site-packages/pandas/core/base.py in __get__(self, instance, owner)
186 # this ensures that Series.str.<method> is well defined
187 return self.accessor_cls
--> 188 return self.construct_accessor(instance)
189
190 def __set__(self, instance, value):
/usr/lib/python3.5/site-packages/pandas/core/series.py in _make_dt_accessor(self)
2640 return maybe_to_datetimelike(self)
2641 except Exception:
-> 2642 raise AttributeError("Can only use .dt accessor with datetimelike "
2643 "values")
2644
AttributeError: Can only use .dt accessor with datetimelike values
The text was updated successfully, but these errors were encountered:
witosx
changed the title
datetime like series second tz_convert fails
datetime like series .dt properties fail after ts.dt.tz_localize(tz1).dt.tz_convert(tz2) sequence
Oct 12, 2015
Second tz_convert fails with AmbiguousTimeError ('UTC' in the example, but other timezones fail too).
EDIT: Actually it's not only second tz_convert that fails, it looks like most (if not all) of the .dt accessed properties are affected
The text was updated successfully, but these errors were encountered: