df = pd.DataFrame(np.random.randn(30, 3), columns=['a','b','c']) df_filtered = df.query('a > 0').query('0 < b < 2')