Pivot table
pivot_tableCross-tabulate CSV data by setting one column as rows and another as columns, then aggregate a value column with count, sum, mean, min, max, or median.
Instructions
Cross-tabulate: one column as rows, another as columns, aggregating a value column. Max 50 output columns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agg | No | sum | |
| file | Yes | CSV path relative to the allowed directory (CSV_INSIGHTS_DIR), e.g. 'sales/2026-q3.csv' | |
| rows | Yes | Column whose values become rows | |
| value | No | Column to aggregate (omit for counts) | |
| where | No | Row filters, all must match (AND) | |
| columns | Yes | Column whose values become columns |