File size: 383 Bytes
102a9b5
 
 
 
 
 
 
 
 
 
a31e83c
1
2
3
4
5
6
7
8
9
10
11
@tool
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}"