xref #7795 #13221. Series/Index concat-like op which triggers object-coercion is not well tested. Followings are needed:
concat
internal to make it consistent / stabled.Found some problems below:
# NG. though it looks OK, the objects are python built-in (must be Timestamp and Timedelta)
s = pd.Series([pd.Timestamp('2011-01-01')]).append(pd.Series([pd.Timedelta('1 days')]))
s
#0 2011-01-01 00:00:00
#0 1 day, 0:00:00
# dtype: object
type(s.iloc[0]), type(s.iloc[-1])
# (datetime.datetime, datetime.timedelta)
# NG, the result must be object dtype contaions Timestamp and Timedelta
idx = pd.DatetimeIndex(['2011-01-01']).append(pd.TimedeltaIndex(['1 days']))
idx
# Index([2011-01-01 00:00:00, 86400000000000], dtype='object')
type(idx[0]), type(idx[-1])
# (pandas.tslib.Timestamp, int)
Expected Output
Timestamp
and Timedelta
(not datetime
and timedelta
)pd.show_versions()
0.18.1
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4