bin_column
Discretize numeric columns into categorical bins using quantile, uniform, or custom edge methods. Create meaningful categories for analysis and modeling.
Instructions
Discretize a numeric column into bins/categories. Methods: 'quantile' (equal-frequency bins), 'uniform' (equal-width bins), 'custom' (provide bin edges as list). For custom bins, pass bins as a list of edges, e.g. [0, 100, 1000, float('inf')]. Example: bin_column(column="Revenue", bins=3, method="quantile", labels=["low","medium","high"]) Example: bin_column(column="Revenue", bins=[0,500,5000,1e9], method="custom", labels=["small","medium","large"])
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": {
"column": "<column>"
},
"name": "bin_column"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bins | No | ||
| column | Yes | ||
| labels | No | ||
| method | No | quantile | |
| df_name | No | ||
| new_column | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |