This project is designed to create a data analysis agent that helps non-technical users interpret and understand advertising data from multiple mediums, such as TV, Radio, Print, Digital, and Outdoor. The agent is powered by Google Generative AI and uses the PandasAI library to provide clear and concise answers to user queries. The data is organized into separate dataframes for each medium, and the agent is trained to respond accurately based on these dataframes.
- Python 3.7+
- pip (Python package installer)
- Virtual environment (optional but recommended)
-
Clone the repository:
git clone https://github.com/bmkjn/Chat-with-Excel.git cd Chat-with-Excel
-
Set up a virtual environment (optional but recommended):
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install the required packages
-
Set up environment variables:
-
Create a
.env
file in the root directory and add the following:GOOGLE_API_KEY=<your-google-api-key> LANGCHAIN_API_KEY=<your-langchain-api-key> PANDASAI_API_KEY=<your-pandasai-api-key>
-
-
Place your data files (Excel format) in the
Data/
directory. -
Run the
ChatwithExcel.ipynb
script: -
The agent will be initialized with data from the specified files. You can interact with the agent by sending queries like:
- "What is the GrossAmount of Jalsa Movies for TV medium?"
- "What is the Market for the top spent Channel for TV medium?"
- "Who created the campaign for Radio Mirchi Jaipur Channel?"
-
The agent will respond with clear and concise answers based on the data.
- Data Interpretation: The agent can interpret user queries with potential spelling or capitalization errors and provide the closest matching correct values.
- Multi-Medium Support: The agent can handle data from different mediums, including TV, Radio, Print, Digital, and Outdoor.
- Language Support: The agent can provide insights into various aspects of ad campaigns, including language, market, amount spent, and more.
- "What are the top 5 ad languages for TV?"
- "Who created the campaign for Radio Mirchi Jaipur Channel?"
- "What is the GrossAmount of Jalsa Movies for TV medium?"