>>> const df = pl.DataFrame(
{
"a": [false, false, true, true],
"b": [false, true, null, true],
"c": ["w", "x", "y", "z"],
}
)
>>> df.withColumns(pl.allHorizontal([pl.col("a"), pl.col("b")]))
shape: (4, 4)
┌───────┬───────┬─────┬───────┐
│ a ┆ b ┆ c ┆ all │
│ --- ┆ --- ┆ --- ┆ --- │
│ bool ┆ bool ┆ str ┆ bool │
╞═══════╪═══════╪═════╪═══════╡
│ false ┆ false ┆ w ┆ false │
│ false ┆ true ┆ x ┆ false │
│ true ┆ null ┆ y ┆ null │
│ true ┆ true ┆ z ┆ true │
└───────┴───────┴─────┴───────┘
Compute the bitwise AND horizontally across columns.