I am trying to create a new datetime column from existing columns (one datetime column and another integer column) in a pandas data frame. Here is my code:
import datetime
df['start_date'] = pd.to_datetime(df['start_date'])
df['end_date'] = df['start_date'] + pd.Timedelta(df.total_waiting_days, unit='D')
But I got the following errors:
ValueError: Value must be Timedelta, string, integer, float, timedelta or convertible
What did I do wrong here and how do I fix this? Thanks!