difference between 2 timestamps pandas
print pd.Timedelta(t2 - t1).seconds / 60.0
difference between 2 timestamps pandas
print pd.Timedelta(t2 - t1).seconds / 60.0
pandas difference between dates
# credit to Stack Overflow user in the source link
import pandas as pd
# df is your pandas dataframe
# if already datetime64 you don't need to use to_datetime
df['A'] = pd.to_datetime(df['A'])
df['B'] = pd.to_datetime(df['B'])
df['diff'] = df['A'] - df['B'] # difference in days
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