I have a pandas dataframe which consists of time series of multiple objects, e.g. each object has an ID and a list of values. Each row of the frame has the form Object_ID Time Value. Now I want to resample this dataframe via pd.resample(). What is the best way to do that treating every object separately?
An example - the original data frame is:
ID Time Value
0 0 1
0 1 1
0 2 1
3 1 4
3 2 6
3 3 6
5 10 0
5 11 1
An example output (resample from time steps 1s to 0.5s):
ID Time Value
0 0 1
0 0.5 1
0 1 1
0 1.5 1
0 2 1
0 2.5 1
3 1 4
3 1.5 5
3 2 6
3 2.5 6
3 3 6
3 3.5 6
5 10 0
5 10.5 0.5
5 11 1
5 11.5 1.5
(The interpolating is not crucial here, I think I can do that). Thanks!