Skip to content

Commit dddcb83

Browse files
Add support for operator & in class Expression.
1 parent 944c527 commit dddcb83

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/core/col.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"__lt__": "<",
3838
"__eq__": "==",
3939
"__ne__": "!=",
40+
"__and__" : "&",
41+
"__rand__" : "&",
4042
}
4143

4244

@@ -156,6 +158,10 @@ def __mod__(self, other: Any) -> Expression:
156158

157159
def __rmod__(self, other: Any) -> Expression:
158160
return self._with_binary_op("__rmod__", other)
161+
def __and__(self, other: Any) -> Expression:
162+
return self._with_binary_op("__and__", other)
163+
def __rand__(self, other: Any) -> Expression:
164+
return self._with_binary_op("__rand__", other)
159165

160166
def __array_ufunc__(
161167
self, ufunc: Callable[..., Any], method: str, *inputs: Any, **kwargs: Any

0 commit comments

Comments
 (0)