Python pandas cumsum() reset after hitting max
问题 I have a pandas DataFrame with timedeltas as a cumulative sum of those deltas in a separate column expressed in milliseconds. An example is provided below: Transaction_ID Time TimeDelta CumSum[ms] 1 00:00:04.500 00:00:00.000 000 2 00:00:04.600 00:00:00.100 100 3 00:00:04.762 00:00:00.162 262 4 00:00:05.543 00:00:00.781 1043 5 00:00:09.567 00:00:04.024 5067 6 00:00:10.654 00:00:01.087 6154 7 00:00:14.300 00:00:03.646 9800 8 00:00:14.532 00:00:00.232 10032 9 00:00:16.500 00:00:01.968 12000 10