extract minutes from timedelta python
seconds = duration.total_seconds()
hours = seconds // 3600
minutes = (seconds % 3600) // 60
seconds = seconds % 60
extract minutes from timedelta python
seconds = duration.total_seconds()
hours = seconds // 3600
minutes = (seconds % 3600) // 60
seconds = seconds % 60
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)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us