我有带有订阅激活日期和订阅结束日期的数据集。我将它们都转换为datetime并进行了订阅以获得日期
df ['SUBSCRIPTION_ACTIVATION_DATE'] = pd.to_datetime(df ['SUBSCRIPTION_ACTIVATION_DATE'])
f ['SUBSCRIPTION_END_DATE'] = pd.to_datetime(df ['SUBSCRIPTION_END_DATE'])
df ['SUBSCRIPTION_DAY'] = df ['SUBSCRIPTION_END_DATE']-df ['SUBSCRIPTION_ACTIVATION_DATE']
现在我正尝试将其转换为整数,并且它也采用HH:MM:SS并创建最后添加0的整数。我正在使用以下命令
df ['SUBSCRIPTION_DAY'] = pd.to_numeric(df ['SUBSCRIPTION_DAY'])
例如:215827200000000000
如何摆脱那些麻烦,只剩下几天