I have a data frame of some registered velocities (V1, V2, V3, MaxV or the maximum velocity) and the corresponding time stamps for each velocity(T1, T2, T3, MaxV_T or the time instant of the maximum velocity) as follows:
df
Event T1 V1 T2 V2 T3 V3 MaxV MaxV_T
0 12:40:44 42.86 12:40:43 45.65 12:40:39 50.5 50.5 T3
1 15:28:15 88.75 15:28:14 86.45 15:28:17 84.56 88.75 T1
The point that in the MaxV_T column doesn't indicate the real value but the title of the column where the real value falls.
What i need to do in python is to replace this value with the real time stamp to be like this
df
Event T1 V1 T2 V2 T3 V3 MaxV MaxV_T
0 12:40:44 42.86 12:40:43 45.65 12:40:39 50.5 50.5 12:40:39
1 15:28:15 88.75 15:28:14 86.45 15:28:17 84.56 88.75 15:28:15
UPDATE
What to do if the position indication is not available, so i don't have the initial MaxV_T column and i need to return the corresponding time value for each velocity?