Hello everyone,
I am cleaning my dataset and having a problem with one of the variables. So I have data that looks somewhat like this. The variable "trip/km" shows the "trip since the last fueling". This implies that for the first date mentioned in the table, I do not need 395 as it does not have the corresponding data.
And for this I also need to further correspond the data correctly with each observation, so now my task is to show that 416 is the trip traveled from 28l of fuel and delete all irrelevant observations. I need to do this for each vehicle-id. I am not sure how to go about it.
Adding to that I might have to change the label for trip/km - trip/km traveled from fuelling.
Can someone please help me out with this?
vehicle-id refueling-date quantity trip/km
13 21-03-2021 28 395
13 13-09-2021 35 416
13 23-04-2021 23 333
20 22-04-2018 80.59 599
20 17-09-2018 87.43 657