~¶
- ColExpr.__invert__() ColExpr[Bool][source]¶
Boolean inversion (__invert__)
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) >> show() Table bool table, backend: PolarsImpl shape: (6, 3) ┌───────┬───────┬───────┐ │ a ┆ b ┆ x │ │ --- ┆ --- ┆ --- │ │ bool ┆ bool ┆ bool │ ╞═══════╪═══════╪═══════╡ │ true ┆ true ┆ false │ │ true ┆ false ┆ false │ │ true ┆ null ┆ false │ │ false ┆ false ┆ true │ │ false ┆ null ┆ true │ │ null ┆ null ┆ null │ └───────┴───────┴───────┘