Calculate difference between 'times' rows in DataFrame Pandas
问题 My DataFrame is in the Form: TimeWeek TimeSat TimeHoli 0 6:40:00 8:00:00 8:00:00 1 6:45:00 8:05:00 8:05:00 2 6:50:00 8:09:00 8:10:00 3 6:55:00 8:11:00 8:14:00 4 6:58:00 8:13:00 8:17:00 5 7:40:00 8:15:00 8:21:00 I need to find the time difference between each row in TimeWeek , TimeSat and TimeHoli, the output must be TimeWeekDiff TimeSatDiff TimeHoliDiff 00:05:00 00:05:00 00:05:00 00:05:00 00:04:00 00:05:00 00:05:00 00:02:00 00:04:00 00:03:00 00:02:00 00:03:00 00:02:00 00:02:00 00:04:00 I