{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Code Execution\n",
    "Our API allows you to actually execute code! This is super useful for building `AI Agents` that can execute different types of code on demand. Here is an example script that also includes using a local file and passing it to the `execute_python` method."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "\n",
    "\n",
    "# Save DataFrame to CSV file\n",
    "csv_filename = 'data_transfer.csv'\n",
    "df = pd.DataFrame({'DUMMY':[10]})\n",
    "df.to_csv(csv_filename, index=False)\n",
    "\n",
    "code = \"\"\"\n",
    "import pandas as pd\n",
    "\n",
    "df = pd.read_csv('data_transfer.csv')\n",
    "print(type(df))\n",
    "print(df)\n",
    "\"\"\"\n",
    "\n",
    "client.execute_python(code)"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
