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
In [3]: idx = pd.date_range('20130101',periods=3,tz='US/Eastern')
In [4]: df = DataFrame({'A' : [1,2,3]})
In [5]: df['B'] = idx
In [6]: df.dtypes
Out[6]:
A int64
B datetime64[ns, US/Eastern]
dtype: object
In [7]: df.loc[[True,False,True],'C'] = idx
In [8]: df
Out[8]:
A B C
0 1 2013-01-01 00:00:00-05:00 2013-01-01 05:00:00
1 2 2013-01-02 00:00:00-05:00 NaT
2 3 2013-01-03 00:00:00-05:00 2013-01-02 05:00:00
# C should be the same time zone
In [9]: df.dtypes
Out[9]:
A int64
B datetime64[ns, US/Eastern]
C datetime64[ns]
dtype: object
@jreback took a stab at the bug outlined above. However, I'm not sure what exactly is meant by
this is also realized to #11351 [4]
The fix I've proposed here doesn't address the referenced bug (AttributeError: 'numpy.ndarray' object has no attribute 'tz_localize'). Is this sufficient fix for this issue or are you looking for a more general fix?
Uh oh!
There was an error while loading. Please reload this page.
xref #12502 (example there as well)
xref #14148
this is also realized to #11351 [4]
The text was updated successfully, but these errors were encountered: