Closed Make42 closed 6 years ago
When using mask() it is possible to AND statements, but I don't see a way of OR-ing statements. Could this please be added to the syntax somehow?
This already exists within mask. You just have to use parentheses with the or pipe.
df = pd.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]}) df >> mask((X.x < 2) | (X.y > 5)) Out[24]: x y 0 1 4 2 3 6
When using mask() it is possible to AND statements, but I don't see a way of OR-ing statements. Could this please be added to the syntax somehow?