verticapy.vDataFrame.all#
- vDataFrame.all(columns: str | list[str], **agg_kwargs) TableSample #
Applies the
BOOL_AND
aggregation method to the vDataFrame.BOOL_AND
, or Boolean AND, evaluates whether all the conditions within a set of Boolean values aretrue
. This is useful when you need to ascertain if every condition holds. It is particularly handy when working with binary data or to ensure that all specified conditions are met within the dataset.Parameters#
- columns: SQLColumns, optional
List of the vDataColumns names. If empty, all vDataColumns are used.
- **agg_kwargs
Any optional parameter to pass to the Aggregate function.
Returns#
- TableSample
result.
Examples#
For this example, we will use the following dataset:
import verticapy as vp data = vp.vDataFrame( { "x": [True, False, False], "y": [False, False, False], "z": [True, True, True], } )
Now, let’s use the
all
aggregator for specific columns.data.all( columns = ["x", "y", "z"], )
bool_and "x" 0.0 "y" 0.0 "z" 1.0 Note
All the calculations are pushed to the database.
Hint
For more precise control, please refer to the
aggregate
method.See also
vDataFrame.
any()
: Boolean OR Aggregation.