pivot_table
Create pivot tables from Excel data to summarize and analyze information by grouping, aggregating, and restructuring datasets for clearer insights.
Instructions
Create a pivot table from Excel data.
Args:
file_path: Path to the Excel file
index: Column to use as the pivot table index
columns: Optional column to use as the pivot table columns
values: Column to use as the pivot table values
aggfunc: Aggregation function ('mean', 'sum', 'count', etc.)
sheet_name: Name of the sheet to pivot (for Excel files)
Returns:
Pivot table as string
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| index | Yes | ||
| columns | No | ||
| values | No | ||
| aggfunc | No | mean | |
| sheet_name | No |