pivot_table
Summarize data with pivot tables and reshape from long to wide format for reporting.
Instructions
Create a pivot table. Stores result as a new dataframe. Creates summary tables. Use for reporting or reshaping data from long to wide format. Example: pivot_table(index=["City"], columns="Category", values="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": {
"index": "<index>",
"columns": "<columns>",
"values": "<values>"
},
"name": "pivot_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| values | Yes | ||
| columns | Yes | ||
| df_name | No | ||
| agg_func | No | mean | |
| result_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |