In [2]:
df
Out[2]:
a b c
i
1 4 7 10
2 5 8 11
3 6 9 12
In [3]:
df.query('i == 1 and (b == 7 or c > 11)')
Out[3]:
a b c
i
1 4 7 10