3 ms·
it is quite simple in pandas, but as a said in another comment, your example is a bit weird, since it turns all values of x into the same. But this is how to do
by in9 9y ago
it is quite simple in pandas, but as a said in another comment, your example is a bit weird, since it turns all values of x into the same. But this is how to do it:
df.assign(x = lambda x: x.ix[2, 'y']).query('x > 3')