nodejs-polars
    Preparing search index...

    Function anyHorizontal

    • Compute the bitwise OR horizontally across columns.

      Parameters

      • exprs: ExprOrString | ExprOrString[]

        Column(s) to use in the aggregation. Accepts expression input. Strings are parsed as column names, other non-expression inputs are parsed as literals.

      Returns pl.Expr

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