check_category_columns
Identify and list categorical columns in your dataset to ensure proper data preprocessing for linear regression model training.
Instructions
This function check if data has categorical columns.
Returns: String which contains list of categorical columns.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:82-97 (handler)The handler function for the 'check_category_columns' tool. It retrieves the data from the global context, selects categorical columns (object or category dtype), and returns a message listing them if any exist, or indicates none.@mcp.tool() def check_category_columns() -> str: """ This function check if data has categorical columns. Returns: String which contains list of categorical columns. """ categorical_data = context.get_data().select_dtypes(include=["object", "category"]) if not categorical_data.empty: return f"Data has following categorical columns: {", ".join(categorical_data.columns.to_list())}" else: return f"Data has no categorical columns."