vastorbit.VastColumn.product¶
- VastColumn.product() Annotated[bool | float | str | timedelta | datetime, 'Python Scalar']¶
Aggregates the VastColumn by applying the
productaggregation function. This function computes the product of values within the dataset, providing insights into the multiplication of data points.The
productaggregation can be particularly useful when we need to assess cumulative effects or when multiplying values is a key aspect of the analysis. This operation can be relevant in various domains, such as finance, economics, and engineering, where understanding the combined impact of values is critical for decision-making and modeling.Note
Since
productis not a conventional SQL aggregation, we employ a unique approach by combining the sum of logarithms and the exponential function for its computation. This non-standard methodology is utilized to derive the product of values within the dataset, offering a distinctive way to understand the multiplicative effects of data points.- Returns:
product
- Return type:
PythonScalar
Examples
For this example, let’s generate a dataset and calculate the product of a column:
import vastorbit as vo data = vo.VastFrame( { "x": [1, 2, 4, 9, 10, 15, 20, 22], "y": [1, 2, 1, 2, 1, 1, 2, 1], "z": [10, 12, 2, 1, 9, 8, 1, 3], } ) data["x"].product()
Note
All the calculations are pushed to the database.
Hint
For more precise control, please refer to the
aggregatemethod.See also
VastColumn.aggregate(): Aggregations for a specific column.VastColumn.quantile(): Quantile Aggregates for a specific column.