ray.data.aggregate.AggregateFnV2.aggregate_block#
- abstract AggregateFnV2.aggregate_block(block: pyarrow.Table | pandas.DataFrame) AggType[source]#
 Aggregates data within a single block.
This method processes all rows in a given
Blockand returns a partial aggregation result for that block. For instance, if implementing a sum, this method would sum all relevant values within the block.- Parameters:
 block – A
Blockof data to be aggregated.- Returns:
 A partial aggregation result for the input block. The type of this result (
AggType) should be consistent with thecurrent_accumulatorandnewarguments of thecombinemethod, and theaccumulatorargument of the_finalizemethod.