How to create a new column in a multi index dataframe which has the dates in each row representing the dates from the reference time. for eg.
THE REFRENCE TIME IS 10:30am everyday.
delta_minutes column represent how much time is before the REFERENCE TIME? For eg. the row where the delta_mins=20 for date 2019-12-2 means that the actual time for that particular row is 10:10am 2019-12-2 which is 20 minutes behind the reference time
I want to add another column which is an indication of what actual time that row indicates so that i can model it in a time series df1 is the actual df while the new datframe that i want to generate looks like df2
df1
date delta_mins sold_before
2019-12-2 20 a1
30 a2
40 a3
50 a4
60 a5
2019-12-3 20 d1
30 d2
40 d3
50 d4
60 d5
2019-12-4 20 g1
30 g2
40 g3
50 g4
60 g5
REFERENCE TIME = 10:30 am
df2
date delta_mins sold_before actual_time
2019-12 20 a1 2019-12-2 10:10
30 a2 2019-12-2 10:00
40 a3 2019-12-2 09:50
50 a4 2019-12-2 09:40
60 a5 2019-12-2 09:30
2019-12-3 20 d1 2019-12-3 10:10
30 d2 2019-12-3 10:00
40 d3 2019-12-3 09:50
50 d4 2019-12-3 09:40
60 d5 2019-12-3 09:30
2019-12-4 20 g1 2019-12-4 10:10
30 g2 2019-12-4 10:00
40 g3 2019-12-4 09:50
50 g4 2019-12-4 09:40
60 g5 2019-12-4 09:30
groupby()function?