convert_dtype
Convert column types to int, float, str, category, datetime, or bool to fix incorrect types like numeric values stored as strings. Apply before statistical analysis or encoding.
Instructions
Convert column types. Dtypes: 'int', 'float', 'str', 'category', 'datetime', 'bool'. Fix incorrect types (numeric stored as string). Do this BEFORE statistical analysis or encoding. Example: convert_dtype(columns=["age","score"], dtype="float")
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": {
"columns": "<columns>",
"dtype": "<dtype>"
},
"name": "convert_dtype"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dtype | Yes | ||
| columns | Yes | ||
| df_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |