I have a dataframe like this:
data = pd.DataFrame({'ID': [1,2,3], 'Dep':[4,5,6], 'Start Date':['2020-01-01', '2020-01-01', '2020-01-01'], 'End Date':['2020-01-03', '2020-01-01', '2020-01-04']})
ID Dep Start Date End Date
0 1 4 2020-01-01 2020-01-03
1 2 5 2020-01-01 2020-01-01
2 3 6 2020-01-01 2020-01-04
I would like to split dates based on days and create new date. Something like below:
ID Dep Start Date End Date New Date
0 1 4 2020-01-01 2020-01-03 2020-01-01
1 1 4 2020-01-01 2020-01-03 2020-01-02
2 1 4 2020-01-01 2020-01-03 2020-01-03
3 2 5 2020-01-01 2020-01-01 2020-01-01
4 3 6 2020-01-01 2020-01-04 2020-01-01
5 3 6 2020-01-01 2020-01-04 2020-01-02
6 3 6 2020-01-01 2020-01-04 2020-01-03
7 3 6 2020-01-01 2020-01-04 2020-01-04
Thank you.