0

This is the problem of which I want to list out each hour in between.

Issue Reported                               Issue Resolved

01-12-19 05:00:00                           02-12-19  07:00:00

07-12-19 08:00:00                          07-12-19  11:00:00

I expect results to be :

[                      
01-12-19 06:00:00,                            
01-12-19 07:00:00,                         
01-12-19 08:00:00,                      
01-12-19 09:00:00,                                   
---                                               
02-12-19 05:00:00,                                    
02-12-19 06:00:00                                       
                ]                                                 
 [                       
 07-12-19 09:00:00                                                      
 07-12-19 10:00:00
                                       ]                             
Arkistarvh Kltzuonstev
  • 6,824
  • 7
  • 26
  • 56
  • This isn't exactly clear. Can you provide more detail? What are the inputs? What are the outputs? – urdearboy Aug 20 '19 at 14:16
  • Possible duplicate of [Have a list of hours between two dates in python](https://stackoverflow.com/questions/44683774/have-a-list-of-hours-between-two-dates-in-python) – dhanlin Aug 20 '19 at 15:06
  • you should post your attempt to solve the problem - or at least an exact description of the problem. Also sharing the table data to test further solutions would be nice! – jgsedi Aug 20 '19 at 15:06
  • https://stackoverflow.com/questions/37349258/python-printing-all-hours-between-two-datetime-accounting-for-daylight-saving/37356117 – Flynnbg Aug 20 '19 at 15:35

1 Answers1

0

result_total = []
for i in range(0,1241): z = pd.to_datetime(df.Issue_Reported[i]) result_total.append( z + pd.to_timedelta(np.arange(df.FAULTY_HOURS[i]), 'H')) print(result_total)

HERE FAULTY_HOURS is the no. hours between ISSUE REPORTED & ISSUE RESOLVED