datatable.rowany()

For each row in cols return True if any of the values in that row are True, or otherwise return False. The function uses shortcut evaluation: if the True value is found in one of the columns, then the subsequent columns are skipped.

Parameters

cols
FExpr[bool]

Input boolean columns.

return
FExpr[bool]

f-expression consisting of one boolean column that has the same number of rows as in cols.

except
TypeError

The exception is raised when one of the columns from cols has a non-boolean type.

Examples

from datatable import dt, f DT = dt.Frame({"A":[True, True], "B":[True, False], "C":[True, True]}) DT
ABC
bool8bool8bool8
0111
1101
DT[:, dt.rowany(f[:])]
C0
bool8
01
11

See Also