So my timestamp in dataframe looks like something like this:
In [18]: df['time'].head(1)
Out[18]: 2021-10-05 12:00:00.000000+00:00
In [19]: df['time'].tail(1)
Out[19]: 2021-10-07 12:00:00.000000+00:00
I want a new column (time_new). There the first timestamp has to be resetted to 0 so starting point is 0. then it only counts up the hours, seconds and milliseconds. So that at the end there are 48 hours in this case. The following table for illustration.
| index | time | time_new |
|------- |---------------------------------- |---------- |
| 0 | 2021-10-05 12:00:00.000000+00:00 | 00:00:00.000 |
| 1 | 2021-10-05 13:00:00.000000+00:00 | 01:00:00.000 |
| 2 | 2021-10-05 13:00:00.001000+00:00 | 01:00:00.001 |
| 3 | 2021-10-06 02:00:00.000000+00:00 | 14:00:00.000 |
| 4 | 2021-10-07 12:00:00.000000+00:00 | 48:00:00.000 |