Expr.xor
methodView source ↗
def xor(other: Any) -> Expr
Categories: logic
Bitwise xor operator with the given expression.
It can be used with integer and bool types.
Parameters
parameter
otherexpression to peform the bitwise xor with.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("val"), td.col("val").xor(8).alias("xor"))
>>>
┌─────┬─────┐
│ val ┆ xor │
│ --- ┆ --- │
│ i64 ┆ i64 │
╞═════╪═════╡
│ 0 ┆ 8 │
│ 30 ┆ 22 │
│ 60 ┆ 52 │
│ 90 ┆ 82 │
└─────┴─────┘