Summary by group
group_summaryComputes grouped statistics such as count, sum, mean, median, min, max, or standard deviation for each category in a file, with sorting and top-N output for comparisons.
Instructions
Analytics-style breakdown: count, sum, mean, median, min, max or SD of a numeric column for each category of another column (e.g. total revenue by region, average order value by segment, top 10 products by profit, rows per status), sorted, top N. Without value_column it counts rows per category. Descriptive only, no p-values. The user confirms the columns first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| file | No | Path to the data file: CSV, TSV, Excel (.xlsx/.xls) or Parquet. If the user attached the file to the chat, pass its path or name here (a file:// link, @name or #file:name also works); do not paste its contents. Relative names are found in the workspace folders. Files of millions of rows are fine. JSON/BSON and other NoSQL data are not tabular and are not supported. | |
| stats | No | Which numbers to show (default count, sum, mean, median; just count without value_column). | |
| sort_by | No | ||
| descending | No | ||
| group_column | Yes | ||
| value_column | No | ||
| confirmation_token | No | Only after the user has confirmed the proposed choices: the confirmation_token from the previous response. |