I have a data frame called df_planned and would like to insert into column "order_date" some random dates from Oct-2021. Is there a way to that in the loop? There are 300 rows of the data so obviously the dates can repeat.
I wrote this function to generate the dates:
import datetime
def new(test_date,K):
res = [test_date + datetime.timedelta(days=idx) for idx in range(K)]
# printing result
return(res)
test_date = datetime.datetime(2021, 10, 1)