df.loc[i,'time in queue']=datetime.datetime.now()-df.loc[i,'IST DateTime']
actual_time_left=float(sla_dict.get( df.loc[i,'SLA Type'])-df.loc[i,'time in queue'].total_seconds()/60)
df.loc[i,'actual time left']=pd.to_timedelta(actual_time_left,unit='m')
where,
df.loc[i,'IST DateTime'] = Timestamp('2023-05-22 08:14:00')
sla_dict.get( df.loc[i,'SLA Type']) = 120
actual_time_left = -221.71050316666668
df.loc[i,'actual time left']=Timedelta('-1 days +20:18:17.369809980')
The IST time was 8:14 AM. The SLA was 120 minutes. This task was supposed to be completed within 120 min. Therefore this PNR was missed by 240 minutes(Approximately) The IST time right now is 2:09 PM. I want to be able to display the actual time left as = - 04:0:0 (i.e it is up by it's SLA by 4 hours) How can I do that?