how to get an integer from a timedelta python code example Example: days to int import numpy as np (td / np.timedelta64(1, 'D')).astype(int)