def execute_code(code_string: str, data: pd.DataFrame) -> str: | |
"""Executes python code and returns results as a string. | |
Args: | |
code_string (str): Python code to execute. | |
data (pd.DataFrame): The dataframe to use in the code | |
Returns: | |
str: The result of executing the code or an error message | |
""" | |
return f"Received code: {code_string}" |