I have a DataFrame like this:
D1 W1
0.1 23.7 22.4
0.2 25.8 26.88
0.3 29.8 30.64
.
.
.
1.0 24.85 38.31
I will give it a value. How to find it in which range of this table?
For example, if I give a value of 27.33, how to find it between 0.2 and 0.3 and then tell me that the upper limit is 29.8 and the lower limit is 25.8?
df[(0.2 < df.index) & (df.index <= 0.3)].describe()
will give you information including the min/max. – anon01