1seconds = duration.total_seconds()
2hours = seconds // 3600
3minutes = (seconds % 3600) // 60
4seconds = seconds % 60
5
1# Convert TimeDelta column (5 days etc.) into an integer column (5)
2import numpy as np
3df.timeDelta = (df.timeDelta / np.timedelta64(1,'D')).astype(int)
1# Convert TimeDelta column (5 days etc.) into an integer column (5)
2import numpy as np
3df['timeDelta'] = (df['timeDelta'] / np.timedelta64(1,'D')).astype(int)