xlsx_pivot
Reshape a flat table from a .xlsx file into a 2D matrix, aggregating values across index and columns. Choose from sum, mean, min, max, count, or count_distinct.
Instructions
pandas-style pivot_table() on a LOCAL .xlsx file — reshape a flat table into a 2D matrix where rows are unique values of index, columns are unique values of columns, and cells are an aggregation of values.
agg modes: sum / mean / min / max / count / count_distinct. Optional fill_value for missing index×column combinations.
USE WHEN: the user wants a cross-tab — "X by Y", "rows by columns" — that needs more than groupby. Returns a markdown table.
DO NOT USE WHEN: there's only one grouping dimension (use xlsx_aggregate). Or for upload/attached files.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agg | No | ||
| columns | No | ||
| file_b64 | Yes | ||
| index | Yes | ||
| options | No | ||
| values | Yes |