I have a data set similar to the image that continues for thousands of rows and columns. I want to go to row 1 and find those start and stop values across the row, where we first hit 3.17 and then when we reach 3.24. Those values will then correspond to a time, column 6 starts at 300 ms and then each column adds another 300 ms. 300, 600, 900, etc. for the thousands of columns. So I want to find the columns that correspond to the values of interest and the amount of time it took to go from the start to final values and do that for every row.
I'm not sure what the right approach is. Then I will still need to figure out how to correspond those values to the times from start to finish to determine the time lapsed and would appreciate some suggestions with that.
I've tried search through the rows to pick out the values using loc or iloc which has given me key errors.
For instance, I tried some things across a single transposed column saved to a separate that has the values I'm interested in to get a better understanding of what could work:
df.iloc[3.17:3.24]
#Type error: can't do indexing on float
or
df.iloc[list(df[(column)] >= 3.17) & (df[(column)] <= 3.24)]
#also an error
df.iloc[list(df[1] == 2.87)]
#Provides all values from the entire list
df = pd.DataFrame({'A': [6,1200000], 'B':np.arange(1200000)})
df.loc[df['A'] == 2.87,'B']
#Provides a value error: all arrays must be the same length