df[['A','B']] = df[['A','B']].apply(pd.to_datetime) #if conversion required df['C'] = (df['B'] - df['A']).dt.days