verticapy.vDataFrame.any#
- vDataFrame.any(columns: str | list[str], **agg_kwargs) TableSample #
Uses the
BOOL_OR
aggregation method in the vDataFrame. This method checks if at least onetrue
condition exists within a set of Boolean values. It’s particularly handy for situations involving binary data or when you need to determine if any of the conditions are met.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
any
aggregator for specific columns.data.any( columns = ["x", "y", "z"], )
bool_or "x" 1.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.
all()
: Boolean AND Aggregation.