datatable.rowmax()

For each row, find the largest value among the columns from cols.

Parameters

cols
FExpr

Input columns.

return
FExpr

f-expression consisting of one column that has the same number of rows as in cols. The column stype is the smallest common stype for cols, but not less than int32.

except
TypeError

The exception is raised when cols has non-numeric columns.

Examples

from datatable import dt, f DT = dt.Frame({"A": [1, 1, 2, 1, 2], "B": [None, 2, 3, 4, None], "C":[True, False, False, True, True]}) DT
ABC
int32int32bool8
01NA1
1120
2230
3141
42NA1
DT[:, dt.rowmax(f[:])]
C0
int32
01
12
23
34
42

See Also

  • rowmin() – find the smallest element row-wise.