ref_day = max(df['InvoiceDate']) + timedelta(days=1)
df['days_to_last_order'] = (ref_day - df['InvoiceDate']).dt.days
df.head()
I am trying to run the above code but not working. Getting error as below
TypeError: can only concatenate str (not "datetime.timedelta") to str