nodejs-polars
    Preparing search index...

    Function maxHorizontal

    • Get the maximum value 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": [1, 8, 3],
      ... "b": [4, 5, null],
      ... "c": ["x", "y", "z"],
      ... }
      ... )
      >>> df.withColumns(pl.maxHorizontal(pl.col("a"), pl.col("b")))
      shape: (3, 4)
      ┌─────┬──────┬─────┬─────┐
      │ a ┆ b ┆ c ┆ max │
      │ --- ┆ --- ┆ --- ┆ --- │
      │ i64 ┆ i64 ┆ str ┆ i64 │
      ╞═════╪══════╪═════╪═════╡
      │ 1 ┆ 4 ┆ x ┆ 4 │
      │ 8 ┆ 5 ┆ y ┆ 8 │
      │ 3 ┆ null ┆ z ┆ 3 │
      └─────┴──────┴─────┴─────┘