TRANSFORM_DATA
Applies a Pandas eval() or formula expression to create a new calculated column in the dataset (Feature Engineering). Cannot overwrite existing columns.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
input_path | string | yes | Absolute path to the dataset. |
output_path | string | yes | Absolute path to save the transformed dataset. |
new_column_name | string | yes | Name of the new column to create. |
expression | string | yes | Pandas eval() compatible expression (e.g., 'price * quantity', 'age > 18'). Column names must match exactly. |
sheet_name | string | — | For Excel files only: specific sheet to analyze. Default is the first sheet. |
How to use it
You normally trigger this by describing what you want in chat — the agent selects TRANSFORM_DATA automatically. For example:
Try saying
“use analyst tools to transform …”
In a workflow
As a step in a multi-step workflow DAG:
json
{
"id": "s1",
"agent": "analyst_tools",
"action": "TRANSFORM_DATA",
"args": {
"input_path": "/Users/me/Documents/file.txt",
"output_path": "/Users/me/Documents/file.txt",
"new_column_name": "…",
"expression": "…"
},
"depends_on": [],
"outputs": []
}Direct call
For scripting, call it directly via POST /execute_tool. Every tool returns { success, message, data }.
bash
curl -X POST http://127.0.0.1:8000/execute_tool \
-H "Content-Type: application/json" \
-d '{"tool_name":"TRANSFORM_DATA","args":{"input_path":"/Users/me/Documents/file.txt","output_path":"/Users/me/Documents/file.txt","new_column_name":"…","expression":"…"}}'Part of the analyst_tools plugin. Browse the full Plugin & Tool Catalog or the relevant feature guide.