run_pandas_code_tool
Execute pandas data analysis code securely with automatic safety checks and smart suggestions. Returns results or error messages.
Instructions
Execute pandas code with smart suggestions and security checks.
Args: code: Python code string containing pandas operations
Returns: dict: Either the result or error information
Forbidden Operations: The following operations are blocked for security reasons: - 'os.', 'sys.', 'subprocess.' - System access operations - 'open(', 'exec(', 'eval(' - Code execution functions - 'import os', 'import sys' - Specific dangerous imports - 'document.', 'window.', 'XMLHttpRequest' - Browser/DOM access - 'fetch(', 'eval(', 'Function(' - JavaScript/remote operations - 'script', 'javascript:' - Script injection attempts
Requirements: - Must assign final result to 'result' variable - Code should contain necessary imports (pandas available as 'pd')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |