pydeephaven.combo_agg¶
- class ComboAggregation[source]¶
Bases:
object
A ComboAggregation object defines a list of aggregations operations that can be evaluated in one single call to the server, as compared to multiple round trips if individual aggregate method is called on a table.
Note, a ComboAggregation object is not bound to any table, thus can be reused on tables with the same schema.
- abs_sum(cols)[source]¶
Add an Absolute-sum aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- avg(cols)[source]¶
Add an Average aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- count(col)[source]¶
Add a Count aggregation to the ComboAggregation object.
- Parameters
col (str) – the column to hold the counts of each distinct group
- Returns
self
- first(cols)[source]¶
Add a First aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- group(cols)[source]¶
Add a group aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- last(cols)[source]¶
Add a Last aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- max(cols)[source]¶
Add a Max aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- median(cols)[source]¶
Add a Median aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- min(cols)[source]¶
Add a Min aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- pct(percentile, cols)[source]¶
Add a Percentile aggregation to the ComboAggregation object.
- Parameters
percentile (float) – the percentile used for calculation
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- std(cols)[source]¶
Add a Std aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self
- sum(cols)[source]¶
Add a Sum aggregation to the ComboAggregation object.
- Parameters
cols (List[str]) – the columns to aggregate on, can be renaming expressions, i.e. “new_col = col”
- Returns
self