📜  将 pandas._libs.tslibs.timedeltas.Timedelta 转换为天 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:43.977000             🧑  作者: Mango

代码示例2
# Convert TimeDelta column (5 days etc.) into an integer column (5)
import numpy as np
df['timeDelta'] = (df['timeDelta'] / np.timedelta64(1,'D')).astype(int)