I have a Pandas DataFrame of data where time in seconds is the index and the other columns are acceleration values. I would like the total time the acceleration value is greater than 60 g's. The issue is the acceleration may be above 60 g's for a while, but will drop below then return again. I have run the code below to turn the acceleration values not greater than or equal to 60 to "NaN". Is there a way to check each row to see if it is not equal to "NaN" and if so add the index (time) until NaN is reached again record the total time then start over again.
shot1_gt60 = shot1_df.where(shot1_df['CH7 [g] RMS']>=60)
shot1_gt60.head()
Time [s] CH7 [g] RMS
-0.250000 NaN
-0.249995 65
-0.249990 67
-0.249985 90
-0.249980 NaN