-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, ExplodeTimedeltaTimedelta data typeTimedelta data typeTimezonesTimezone data dtypeTimezone data dtype
Milestone
Description
Code Sample, a copy-pastable example if possible
pd.concat([pd.Series([pd.Timestamp('2011-01-01', tz='US/Eastern')]),
pd.Series([pd.Timedelta('1 day')])])
# AttributeError: 'numpy.ndarray' object has no attribute 'tz_localize'
Expected Output
pd.Series([pd.Timestamp('2011-01-01', tz='US/Eastern'), pd.Timedelta('1 day')])
#0 2011-01-01 00:00:00-05:00
#1 1 days 00:00:00
# dtype: object
output of pd.show_versions()
current master.
It is caused by the below line, we must check typs
length must be 1, otherwise the result should be object
dtype.
https://github.com/pydata/pandas/blob/master/pandas/tseries/common.py#L278
Metadata
Metadata
Assignees
Labels
BugReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, ExplodeTimedeltaTimedelta data typeTimedelta data typeTimezonesTimezone data dtypeTimezone data dtype