Expr.and_
methodView source ↗
def and_(*others: Any) -> Expr
Categories: logic
Bitwise and operator with the given expressions.
It can be used with integer and bool types.
Parameters
parameter
othersexpressions to peform the bitwise and with.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("i"), td.col("i").and_(2).alias("and_"))
>>>
┌──────┬──────┐
│ i ┆ and_ │
│ --- ┆ --- │
│ i64 ┆ i64 │
╞══════╪══════╡
│ -1 ┆ 2 │
│ 2 ┆ 2 │
│ -3 ┆ 0 │
│ 0 ┆ 0 │
│ 5 ┆ 0 │
│ 7 ┆ 2 │
│ null ┆ null │
└──────┴──────┘