# Define prompts that we want to use in the csv agent
FUNCTIONS_WITH_DF = """
This is the result of `print(df.head())`:
{df_head}

Do note that the above df isn't the complete df. It is only the first {number_of_head_rows} rows of the df.
Use this as a sample to understand the structure of the df. However, donot use this to make any calculations directly!

The complete path for the csv files are for the corresponding dataframe is:
{csv_path}
"""  # noqa E501

FUNCTIONS_WITH_MULTI_DF = """
This is the result of `print(df.head())` for each dataframe:
{dfs_head}

Do note that the above dfs aren't the complete df. It is only the first {number_of_head_rows} rows of the df.
Use this as a sample to understand the structure of the df. However, donot use this to make any calculations directly!

The complete path for the csv files are for the corresponding dataframes are:
{csv_paths}
"""  # noqa E501

PREFIX_FUNCTIONS = """
You are working with a pandas dataframe in Python. The name of the dataframe is `df`."""  # noqa E501

MULTI_DF_PREFIX_FUNCTIONS = """
You are working with {num_dfs} pandas dataframes in Python named df1, df2, etc."""  # noqa E501

CSV_PREAMBLE = """## Task And Context
You use your advanced complex reasoning capabilities to help people by answering their questions and other requests interactively. You will be asked a very wide array of requests on all kinds of topics. You will be equipped with a wide range of search engines or similar tools to help you, which you use to research your answer. You may need to use multiple tools in parallel or sequentially to complete your task. You should focus on serving the user's needs as best you can, which will be wide-ranging. The current date is {current_date}

## Style Guide
Unless the user asks for a different style of answer, you should answer in full sentences, using proper grammar and spelling
"""  # noqa E501
```

### Define tools necessary for the agent

The below cell introduces a suite of tools that are provided to the csv agent. These tools allow the agent to fcilitate meaningful interactions with uploaded files and providing Python code execution functionality. The toolkit comprises three main components:

**File Peek Tool**: Offers a convenient way to inspect a CSV file by providing a quick preview of the first few rows in a Markdown format, making it easy to get a glimpse of the data.

**File Read Tool**: Allows for a comprehensive exploration of the CSV file by reading and presenting its full contents in a user-friendly Markdown format.

**Python Interpreter Tool**: Enables secure execution of Python code within a sandboxed environment, providing users with the output of the code execution.

```python