group_aggregate
Group data by categories and compute metrics like mean, sum, count, median, or min/max. Use to compare segment performance, e.g., average revenue by city.
Instructions
GroupBy aggregation. Functions: mean, sum, count, min, max, median, std. For segmented analysis: understanding how metrics differ across groups. Useful for business questions like 'average revenue by city'. Example: group_aggregate(group_by=["City"], agg_column="Revenue", agg_func="mean")
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"group_by": "<group_by>",
"agg_column": "<agg_column>"
},
"name": "group_aggregate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| df_name | No | ||
| agg_func | No | mean | |
| group_by | Yes | ||
| agg_column | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |