I have imported CSV file with temperature values to Python pandas DataFrame. I would like to find the range where the temperature is between 9 to 11 degrees (Celsius). How to do that?
So far I import CSV to MS Excel and write down the range number, for example 9 to 11 degrees are in cells A19:A34. Then in Python:
df.loc[19:34, 'Temperature'].mean()
The order must be preserved, because I am calibrating temperature sensor and later need to find the average of last 25% of measured values. Let's say in certain condition I measure 10 minutes, the sensor will stabilize, and to get the mean temperature I find the average of last measured values.
Later I follow my previous topic: Find the average of last 25% from the input range in pandas