Create Feature
create_featureCreate a new dataset column by evaluating a row-wise arithmetic expression over existing columns, optionally on a split to prevent target leakage. Supports math functions and overwrite behavior.
Instructions
Create a new column from a row-wise arithmetic expression over existing columns.
Examples: "selling_price / km_driven", "log(km_driven + 1)", "(year - 2000) * 2", "engine cc * power".
Use backticks around column names that contain spaces. Available functions: log, log10, log1p,
sqrt, exp, abs, sin, cos, tanh, floor, ceil. Method calls (x.mean()) and assignments are rejected
because they would compute statistics per split and leak test data.
Recommended: pass a split_id so the target column cannot be used in the expression by accident.
Args:
dataset_id (str): ID of a dataset or of a split.
name (str): Name of the new column.
expression (str): The expression to evaluate for every row.
overwrite (bool): Replace the column if the name already exists. Default is False.
Returns:
dict: The new column, its dtype, missing count and a short preview.
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": {
"dataset_id": "<dataset_id>",
"name": "<name>",
"expression": "<expression>"
},
"name": "create_feature"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| overwrite | No | ||
| dataset_id | Yes | ||
| expression | Yes |