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
importpandasaspd## two timepoints in UTC flanking the US/Eastern DST shiftdate_strings= ['2015-11-01T05:00:00Z', '2015-11-01T07:00:00Z']
S=pd.Series(date_strings)
## Convert to US/Eastern S=pd.to_datetime(S).apply(lambdax: x.tz_localize('UTC').tz_convert('US/Eastern'))
S.dt.dayofweek## AttributeError: Can only use .dt accessor with datetimelike values## Note: the problem does not arise if the US/Eastern version of the times are on different days## e.g. if date_strings = ['2015-11-01T03:00:00Z', '2015-11-01T07:00:00Z']
Using python 3.4 and pandas 0.17.0.
When a Series contains two time-zone aware datetimes on the 'same day' in the local time zone on either side of the Fall 2015 daylight savings time shift, calling .dt produces an attribute error.
The text was updated successfully, but these errors were encountered:
Using python 3.4 and pandas 0.17.0.
When a Series contains two time-zone aware datetimes on the 'same day' in the local time zone on either side of the Fall 2015 daylight savings time shift, calling .dt produces an attribute error.
The text was updated successfully, but these errors were encountered: