Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

pandas-ai

> 数据库
Open source

Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.

23.7K stars0 likes1 views
WebsiteGitHub

About

Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.

PandasAI is a Python library that makes it easy to ask questions to your data in natural language. It helps non-technical users to interact with their data in a more natural way, and it helps technical users to save time, and effort when working with data.

🔧 Getting started

You can find the full documentation for PandasAI here.

📚 Using the library

Python Requirements

Python version 3.8+ <=3.11

📦 Installation

You can install the PandasAI library using pip or poetry.

With pip:

bash
pip install pandasai
pip install pandasai-litellm

With poetry:

bash
poetry add pandasai
poetry add pandasai-litellm

💻 Usage

Ask questions

python
import pandasai as pai
from pandasai_litellm.litellm import LiteLLM

# Initialize LiteLLM with your OpenAI model
llm = LiteLLM(model="gpt-4.1-mini", api_key="YOUR_OPENAI_API_KEY")

# Configure PandasAI to use this LLM
pai.config.set({
    "llm": llm
})

# Load your data
df = pai.read_csv("data/companies.csv")

response = df.chat("What is the average revenue by region?")
print(response)

Or you can ask more complex questions:

python
df.chat(
    "What is the total sales for the top 3 countries by sales?"
)
The total sales for the top 3 countries by sales is 16500.

Visualize charts

You can also ask PandasAI to generate charts for you:

python
df.chat(
    "Plot the histogram of countries showing for each one the gdp. Use different colors for each bar",
)

Multiple DataFrames

You can also pass in multiple dataframes to PandasAI and ask questions relating them.

…
Olivia gets paid the most.

Docker Sandbox

You can run PandasAI in a Docker sandbox, providing a secure, isolated environment to execute code safely and mitigate the risk of malicious attacks.

Python Requirements
bash
pip install "pandasai-docker"
Usage
…
Olivia gets paid the most.

You can find more examples in the examples directory.

📜 License

PandasAI is available under the MIT expat license, except for the pandasai/ee directory of this repository, which has its license here.

If you are interested in managed PandasAI Cloud or self-hosted Enterprise Offering, contact us.

Resources

  • Docs for comprehensive documentation
  • Examples for example notebooks
  • Discord for discussion with the community and PandasAI team

🤝 Contributing

Contributions are welcome! Please check the outstanding issues and feel free to open a pull request. For more information, please check out the contributing guidelines.

Thank you!

Issues· 23 open

View all issuesOpen on GitHub
  • #1905

    Replace existing skills for edited function

    Updated Aug 31, 2026
  • #1872

    Upgrade supported Python version >=3.12 for pandasai

    Updated Aug 25, 2026
  • #1900

    Data Ai

    Updated Jul 27, 2026
  • #1896

    Free trial is mentioned as no cc required but it expects a cc

    bugUpdated Jun 15, 2026
  • #1895

    Default code executor runs LLM-generated code with full builtins (no sandbox by default) -> RCE via indirect prompt injection

    bugUpdated Jun 12, 2026
  • #1893

    Code Injection in CodeExecutor.execute Allows Arbitrary Code Execution via LLM-Generated Code

    Updated May 27, 2026

> Tags

Pythonaicsvdatadata-analysis

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 30, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库