I've got a dataframe that has a column of dates that are formatted like this:
"1/1/2016"
I would like to create a for-loop that starts from that date and goes to "1/2/2016", "1/3/2016", and so on.
I start with this Python code:
df = pd.read_csv('myfile.csv')
df['dates'] = pd.to_datetime(df['dates'])
Which turns the date format to this: '01-01-2016' Next:
start_date = '01-01-2016'
Finally, the for-loop:
for j in range (1,30)
start_date + j...
But you can't add an integer to that date format, of course. What should I do in the for-loop to just go to the next day?