I have a dataframe which looks as:
df.ix[1:3]
Val endDay startDay
1 2.20 1996-04-01 1996-03-31
2 5.15 1997-04-05 1997-04-01
The startDay
however starts at hour 9 am
and continues until 8 am
on end day.
I am looking for the following output:
startDay Hour Val
1996-03-31 9 2.20
1996-03-31 10 2.20
........
1996-03-31 24 2.20
1996-04-01 1 2.20
........
1996-04-01 7 2.20
1996-04-01 8 2.20
1997-04-01 9 5.15
1997-04-01 10 5.15
........
1997-04-01 24 5.15
1997-04-05 1 5.15
........
1997-04-05 7 5.15
1997-04-05 8 5.15
I just used .....
to represent the continuation of hours 11 through 23 and 2 though 6. I am not sure how to do this stacking pythonically.