Countplot
countplotGenerate a saved count plot showing how often each value in a dataset column occurs, including categorical or low-cardinality numerical columns, with an optional top_n limit.
Instructions
Generate and save a count plot showing how often each value of a column occurs. Works for categorical columns and for numerical columns with few distinct values. Args: dataset_id (str): ID of the dataset. column_name (str): Column to count. top_n (int): Maximum number of values to show. Default is 20. Returns: dict: Dataset ID, column name, counts shown, and saved image filename.
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>",
"column_name": "<column_name>"
},
"name": "countplot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | ||
| dataset_id | Yes | ||
| column_name | Yes |