Let us assume, I have data in dataframe which contains 3 variables as follows
t a b
2012-03-01 00:00:00 100 2
2012-03-01 00:00:10 200 5.6
2012-03-01 00:00:20 500 6.2
2012-03-01 00:00:30 600 7.0
2012-03-01 00:00:40 50 3.2
2012-03-01 00:00:50 70 12.12
2012-03-01 01:00:00 1000 15.14
2012-03-01 00:00:10 2100 4.9
What I would like to do is filter the datasets if 100 < a < 2000
and b > 5
and save those values to new dataframe. So at the end hoping to get new dataframe table like this:
t a b
2012-03-01 00:00:10 200 5.6
2012-03-01 00:00:20 500 6.2
2012-03-01 00:00:30 600 7.0
2012-03-01 01:00:00 1000 15.14
Can somebody help me on this problem where more conditional statement can be applied for problem such as mine in list comprehension?