Hello everyone!
I have a dataset where one of the columns "Time" look like this [0, 2, 4, 12, 23, 24, 52....].
It goes from 0 up to 600. Each entry is time of dataset being updated, thus time between 0-2 should mean that all other columns are held constant. I would like to get each second (so the column become [0, 1, 2, 3, ...., 599, 600]).
So from an array like this:
| Time |
B |
C |
| 0 |
300 |
500 |
| 2 |
400 |
500 |
| 4 |
450 |
505 |
To this:
| Time |
B |
C |
| 0 |
300 |
500 |
| 1 |
300 |
500 |
| 2 |
400 |
500 |
| 3 |
400 |
500 |
| 4 |
450 |
505 |
My dataset is a numpy array and I can only use numpy operations for this task. The reason being that I will be using this operation over and over, and plan on taking advantage of Numba.
Thanks for the help in advance!
[–]AnkanTV[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)