aggregate_data
Groups rows by selected columns in an Excel sheet and aggregates values using operations such as sum, mean, or count.
Instructions
Group rows by column(s) and aggregate values using the specified operation.
Args: file_path: Workbook path. sheet_name: Worksheet name. group_by: Column or list of columns to group by. value_column: Column to aggregate. operation: Aggregation operation (e.g. 'sum', 'mean', 'count'). has_header: Whether the sheet has a header row. aggfunc: Optional pandas-style aggfunc or mapping.
Returns: dict: Aggregated results (may be written to sheet if underlying tool provides an option).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aggfunc | No | ||
| group_by | Yes | ||
| file_path | Yes | ||
| operation | No | sum | |
| has_header | No | ||
| sheet_name | Yes | ||
| value_column | Yes |