datatable.rowall()¶
For each row in cols return True if all values in that row are True,
or otherwise return False. The function uses shortcut evaluation:
if the False value is found in one of the columns, then the subsequent columns
are skipped. Missing values are counted as False.
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
TypeErrorThe 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
| A | B | C | ||
|---|---|---|---|---|
| bool8 | bool8 | bool8 | ||
| 0 | 1 | 1 | 1 | |
| 1 | 1 | 0 | 1 |
DT[:, dt.rowall(f[:])]
| C0 | ||
|---|---|---|
| bool8 | ||
| 0 | 1 | |
| 1 | 0 |
See Also¶
The content on this page is licensed under the Creative Commons Attribution 4.0 License
(CC BY 4.0) ,
and code samples are licensed under the MIT License.