So, I have a column with a start date, and one with a closed date. I want the difference between them so I use:
`df1['Time Resolved'] = abs(df['Closed Datetime']-df['Start Datetime'])`
Then I would like the median value from the Time Resolved column, so I use:
`time_resolved = df1['Time Resolved'].median()`
Which gives me a timedelta result. The issue is that I would like to export this result to Excel but when I use this function:
`df2 = time_resolved`
`df2.to_excel(writer, sheet_name="1", index=True)`
Pandas tells me that timedelta has no attribute 'to_excel'. I've tried converting the result to a string which didn't work either, and I can't find the correct code to convert it to an integer.
Is there a solution to this?