Hello dear community,
I cannot really figure out the following problem:
I have this data:
start end nominal
1 8/23/2021 9/15/2021 10000
2 9/1/2021 9/15/2021 100500
3 9/2/2021 9/15/2021 30000
4 9/3/2021 9/15/2021 2200
I want to transform it into:
date 1 2 3 4
2021-08-23 00:00:00 1000
2021-08-24 00:00:00 1000
2021-08-25 00:00:00 1000
2021-08-26 00:00:00 1000
2021-08-27 00:00:00 1000
2021-08-28 00:00:00 1000
2021-08-29 00:00:00 1000
2021-08-30 00:00:00 1000
2021-08-31 00:00:00 1000
2021-09-01 00:00:00 1000 10050
2021-09-02 00:00:00 1000 10050 3000
2021-09-03 00:00:00 1000 10050 3000 2200
2021-09-04 00:00:00 1000 10050 3000 2200
2021-09-05 00:00:00 1000 10050 3000 2200
2021-09-06 00:00:00 1000 10050 3000 2200
2021-09-07 00:00:00 1000 10050 3000 2200
2021-09-08 00:00:00 1000 10050 3000 2200
2021-09-09 00:00:00 1000 10050 3000 2200
2021-09-10 00:00:00 1000 10050 3000 2200
2021-09-11 00:00:00 1000 10050 3000 2200
2021-09-12 00:00:00 1000 10050 3000 2200
2021-09-13 00:00:00 1000 10050 3000 2200
2021-09-14 00:00:00 1000 10050 3000 2200
2021-09-15 00:00:00 1000 10050 3000 2200
So that I generate the data range starting from the earliest date of the column "start" and finishing it with the very last date of the column "end".
I have created a new df with nan columns, but I cannot wrap my mind around mapping values from nominal to generated dates between start and end. I have tried using iterrows, map and even pivoting but have not gotten far in my attempts.
I would be grateful if you could help me :)