get a date before for 1 day python code example
Example 1: 1 day ago python datetime
date_N_days_ago = datetime.now() - timedelta(days=N)
Example 2: remove days when subtracting time python
df_test['Difference'] = (df_test['First_Date'] - df_test['Second Date']).dt.days