【发布时间】:2020-08-31 14:43:09
【问题描述】:
#Under d.types i can confirm they are both datetime objects
date1 datetime64[ns]
date2 datetime64[ns]
df_test['snaptoexpectedStart'] = df['date1'] - df['date2']
TypeError: '<' not supported between instances of 'str' and 'int'
当我试图减去的两列都采用正确的格式时,我不明白为什么会出现该错误。
【问题讨论】:
-
这就是我目前正在尝试的:(