






timedelta64[ns]
0 8 days, 00:00:00
1 15 days, 00:00:00
2 5 days, 00:00:00
Name: DELTA, dtype: timedelta64[D]
0 8 days, 00:00:00
1 15 days, 00:00:00
2 5 days, 00:00:00
Nothing changed at all
AttributeError: 'Series' object has no attribute 'days'
Ss_timedelta = df_trans['DATE2'] - df_trans['DATE1']
ls_timedelta = Ss_timedelta.values.astype('timedelta64[D]').tolist()
for i in range(0, len(ls_timedelta)):
ls_timedelta[i] = ls_timedelta[i].days / 1000
df_trans['HOLDDAYS'] = pd.Series(ls_timedelta)
Full discussion at GitHub
https://github.com/pydata/xarray/issues/1143
This is the comparison for results before and after applying SMA10/20 and SMA20/50 in the stock trader. Background Trading 3 stock ma...