Loading...

vastorbit.VastFrame.any

VastFrame.any(columns: Annotated[str | list[str], 'STRING representing one column or a list of columns'], **agg_kwargs) TableSample

Uses the BOOL_OR aggregation method in the VastFrame. This method checks if at least one true 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 VastColumns names. If empty, all VastColumns are used.

  • **agg_kwargs – Any optional parameter to pass to the Aggregate function.

Returns:

result.

Return type:

TableSample

Examples

For this example, we will use the following dataset:

import vastorbit as vo

data = vo.VastFrame(
    {
        "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"
"y"
"z"
Rows: 1-3 | Columns: 2

Note

All the calculations are pushed to the database.

Hint

For more precise control, please refer to the aggregate method.

See also

VastFrame.all() : Boolean AND Aggregation.