I have a dataframe like this:
zip season season_start_date season_end_date
zip1 winter 2015-11-25 2016-03-09
I need kind to flatten the date between the start and end dates. I expect the output like this:
zip season date
zip1 winter 2015-11-25
zip1 winter 2015-11-26
.
.
zip1 winter 2016-03-09
How could I realize in a more elegant way?
data = {"zip":["zip1","zip1"],
"season":["s6","s6"],
"season_start_date": ["2011-01-01","2011-01-01"],
"season_end_date" : ["2012-01-05","2012-01-05"]
}
df = pd.DataFrame(data=data)
Thanks.