Time Series - Values recorded every 10 minutes - Fill missing values
One option would be to interpolate the missing values. There are various methods depending on your use case (ie. linear, cubic, etc.)

https://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.interpolate.html

You could also drop the missing values df.dropna() and just use the known values you have for thresholding.  

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html