I have this dataframe:
Product Start Time End Time
A 2021-02-03 00:07:43 2021-02-03 00:42:53.000000000
B 2021-02-03 00:11:15 2021-02-03 00:13:55.000000000
C 2021-02-03 00:13:16 2021-02-03 00:13:16.000000000
D 2021-02-03 00:16:48 2021-02-03 00:21:52.000000000
E 2021-02-03 00:17:11 2021-02-03 00:31:31.000000000
I need to do a subtraction between two datetime columns.
df['duration'] = ((df['End time']) - (df['Start Solicitud']))
The result is:
0 0 days 00:02:38
1 0 days 00:02:38
2 0 days 00:02:38
3 0 days 00:02:38
4 0 days 00:02:38
I need format
0 00:02:38
1 00:02:38
2 00:02:38
3 00:02:38
4 00:02:38