Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# PandasAI - Simple Example Project A simple example project demonstrating how to use PandasAI with your own datasets. ## Setup 1. **Activate your virtual environment:** ```powershell .\projectenv\Scripts\activate ``` 2. **Set up environment variables in `.env`:** ``` OPENAI_API_KEY=your-api-key OPENAI_API_BASE=https://openrouter.ai/api/v1 ``` ## Quick Start ```python import os import pandas as pd import pandasai as pai from extensions.llms.openai.pandasai_openai.openai import OpenAI # Set up the LLM llm = OpenAI( api_key=os.environ["OPENAI_API_KEY"], api_base=os.environ["OPENAI_API_BASE"] ) pai.config.set({"llm": llm}) # Load your data df = pd.read_csv("data.csv") smart_df = pai.DataFrame(df) # Ask questions answer = smart_df.chat("What is the average value?") print("Answer:", answer) ``` ## Run the Demo ```powershell python demo.py ``` ## License MIT License # dataai

About

a simple nlp tool to intreact with your data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages