tabsdata.tableframe.expr.expr.Expr.and_#

Expr.and_(*others: Any) Expr[source]#

Bitwise and operator with the given expressions. It can be used with integer and bool types.

Parameters:

others – expressions to peform the bitwise and with.

Example:

>>> 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 │
└──────┴──────┘