Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python: calculate number of days from today date in a data frame

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: #calculate #number #days #today #date #data #frame
ADD COMMENT
Topic
Name
4+7 =