convert timedelta to int code example
Example 1: convert timedelta to days
# 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)
Example 2: days to int
import numpy as np
(td / np.timedelta64(1, 'D')).astype(int)