&

ColExpr.__and__(
rhs: ColExpr[Bool],
) ColExpr[Bool][source]

Boolean AND (__and__)

Examples

>>> t = pdt.Table(
...     {
...         "a": [True, True, True, False, False, None],
...         "b": [True, False, None, False, None, None],
...     },
...     name="bool table",
... )
>>> t >> mutate(x=t.a & t.b) >> show()
Table bool table, backend: PolarsImpl
shape: (6, 3)
┌───────┬───────┬───────┐
│ a     ┆ b     ┆ x     │
│ ---   ┆ ---   ┆ ---   │
│ bool  ┆ bool  ┆ bool  │
╞═══════╪═══════╪═══════╡
│ true  ┆ true  ┆ true  │
│ true  ┆ false ┆ false │
│ true  ┆ null  ┆ null  │
│ false ┆ false ┆ false │
│ false ┆ null  ┆ false │
│ null  ┆ null  ┆ null  │
└───────┴───────┴───────┘