I have a dataframe which looks like the following:
START_TIME END_TIME TRIAL_No itemnr
2403950 2413067 Trial: 1 P14
2413378 2422499 Trial: 2 P03
2422814 2431931 Trial: 3 P13
2432246 2441363 Trial: 4 P02
2523540 2541257 Trial: 5 P11
2541864 2560297 Trial: 6 P10
2560916 2577249 Trial: 7 P05
The table goes on and on like that. The START_TIME and END_TIME are all in milliseconds which are the start and end time of a trial. So what I want to do is, I want to resample the START_TIME into 100milliseconds bin itme and interpolate the variables (TRIAL_No and itemnr) between each START_TIME and END_TIME. Outside of these regions, these variables should have the value "NA". For example, for the first row the START_TIME is 2403950 and the END_TIME is 2413067. The difference between them is 9117 milliseconds. So "Trial: 1" stays for 9117msecs which is for aroud 91 bin times since each bin time is 100msec apart. So I want to repeat "Trial_1" and "P14" 91 times in the resulting dataframe. The same goes for the rest. Looks like the following:
Bin_time TRIAL_No itemnr
2403950 Trial: 1 P14
2404050 Trial: 1 P14
2404150 Trial: 1 P14
...
2413050 Trial: 1 P14
2413150 Trial: 2 P03
2413250 Trial: 2 P03
and so on. I am not sure if it is possible directly in pandas or some preprocessing is needed.