Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas diff between dates

df[['A','B']] = df[['A','B']].apply(pd.to_datetime) #if conversion required
df['C'] = (df['B'] - df['A']).dt.days
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #diff #dates
ADD COMMENT
Topic
Name
9+7 =