There's nothing exactly equivalent (you can't attach the DataFrame to the namespace like in R), but you can use the experimental DataFrame.query() method and DataFrame.eval() method, available in 0.13 (release candidate should be out this week), will let you do things like:
>>> df = DataFrame({"A": range(10), "B": range(0, 20, 2)}) >>> df A B 0 0 0 1 1 2 2 2 4 3 3 6 4 4 8 5 5 10 6 6 12 7 7 14 8 8 16 9 9 18 >>> df.query("A < 5 and B in (1, 2, 3, 5, 6)") A B 1 1 2 3 3 6 >>> df.eval("A + B") 0 0 1 3 2 6 3 9 4 12 5 15 6 18 7 21 8 24 9 27 dtype: int64
As a bonus, on large frames this gets accelerated by numexpr.
The statsmodels' formula API also lets you refer to formulas like in R.