unpivot_data
Reshape wide Excel data into a long format by choosing identifier columns and value columns to melt. This enables easier analysis and visualization of unpivoted datasets.
Instructions
Melt (unpivot) wide-form data to long-form using id_vars and value_vars.
Args: file_path: Workbook path. sheet_name: Source sheet. id_vars: Columns to keep as identifiers. value_vars: Columns to melt into variable/value pairs. var_name: Name for the variable column. value_name: Name for the value column.
Returns: dict: Result summary and destination range if written.
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": {
"file_path": "<file_path>",
"sheet_name": "<sheet_name>",
"id_vars": "<id_vars>",
"value_vars": "<value_vars>"
},
"name": "unpivot_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_vars | Yes | ||
| var_name | No | Variable | |
| file_path | Yes | ||
| sheet_name | Yes | ||
| value_name | No | Value | |
| value_vars | Yes |