Yes there is a better way! Just use the & element-wise logical and operator:
d.bar & d.foo
0 True
1 False
2 False
dtype: bool
Yes there is a better way! Just use the & element-wise logical and operator:
d.bar & d.foo
0 True
1 False
2 False
dtype: bool