tensor_from_wide
Convert wide tables with encoded column names (e.g., AAPL_close) into an indexed tensor by splitting names on a separator, preserving column order or applying custom dimension order.
Instructions
Turn a wide table whose column names encode several keys (AAPL_close, AAPL_volume, MSFT_close, ...) into a tensor index x dims..., splitting column names on sep. dims default to ['series', 'feature']. The wide table's column order is kept for the name-derived dims (so a tenor axis 1m,3m,6m,1y,2y stays in that order); sort=True sorts naturally instead, order={dim: [...]} pins an explicit order.
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": {
"name": "<name>"
},
"name": "tensor_from_wide"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sep | No | _ | |
| dims | No | ||
| name | Yes | ||
| sort | No | ||
| order | No | ||
| new_name | No | ||
| index_dim | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |