I have a Pandas dataframe including two dates column in datetime. And I want to generate a list of dates in this date rage as a new column, so I can explode the entry into multiple rows later.
I tried the following list comprehension.
orders_df['list_of_dates'] = [orders_df['start_date'] + timedelta(days=n) for n in range(orders_df['date_difference'])]
But the following message was received
TypeError: 'Series' object cannot be interpreted as an integer
Any thoughts on the solution would be much appreciated.