skillfed

pandasai

Chat with your database (SQL, CSV, pandas, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.

pandasai v3.0.0 196.4K downloads/30d#9,787 on PyPI23,742
Permissive license MIT AGING released

What it is and what it does

PandasAI is a Python library that bridges natural language and data analysis by accepting plain-English questions about your data and translating them into executable operations. It works with pandas DataFrames, CSV files, SQL databases, and other data sources, using an LLM backend to understand intent and generate the appropriate code or queries. The library handles both analytical queries ("What is the average revenue by region?") and visualization requests (chart generation).

The core workflow involves configuring an LLM provider, loading your data, and calling `.chat()` with a natural-language question. PandasAI then generates and executes the necessary pandas, SQL, or visualization code, returning results directly. It supports multi-DataFrame queries, Docker sandboxing for secure code execution, and integrates with standard data-science libraries (pandas, numpy, matplotlib, seaborn, scipy, duckdb, sqlglot). The library requires Python 3.8–3.11 and depends on 16 runtime packages.

Use it for:

  • Non-technical stakeholders exploring datasets without SQL or Python knowledge, asking ad-hoc analytical questions.
  • Data analysts reducing boilerplate by asking for charts and aggregations in plain language instead of writing code.
  • Building conversational data interfaces in applications where users query databases via natural language.
  • Rapid exploratory data analysis during prototyping, avoiding context-switching to write queries manually.
  • Secure code execution in multi-tenant or untrusted environments using the Docker sandbox feature.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PandasAI lets you ask questions about your data in natural language and get answers without writing SQL or Python code, using an LLM backend to translate questions into data operations.

Yes, if you have an LLM API key and want to reduce friction in data exploration or build conversational data interfaces. The low install friction, permissive license, and active repository make it a reasonable choice. However, maintenance is aging (311 days since last release), so verify that the library's feature set and bug-fix cadence meet your stability requirements before committing to production use. Cost and latency of LLM calls should also factor into your decision.

Install

pandasai on PyPI

pip

pip install pandasai

uv

uv add pandasai

poetry

poetry add pandasai

Installing pandasai

Before you install

Low install friction with a pure-Python wheel. Maintenance status is aging—last release was 311 days ago—but the repository remains active with recent commits and substantial community engagement.

License in practice

MIT license (permissive) applies to the core library, allowing commercial and private use with minimal restrictions. The ee directory has a separate license; check it if you plan to use enterprise features.

Quickstart

pip install pandasai

import pandasai as pai
from pandas import DataFrame

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

Requires an LLM API key (OpenAI, Anthropic, VertexAI, or similar) and Python 3.8–3.11; Python 3.12+ is not supported.

Verify before relying

  • Whether the aging maintenance status (311 days since last release) signals reduced active development or stable maturity.
  • Performance characteristics and cost implications when querying large datasets through an LLM backend.
  • Whether the Docker sandbox feature requires Docker to be installed and running on the user's system.
  • Which specific LLM providers are supported and how to configure them beyond the documented examples.

Package facts

License MIT (permissive)
Python support capped below the current Python release (<3.12,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 16 — python-dotenv, pandas, scipy, astor, matplotlib, pydantic, duckdb, pillow, requests, jinja2, numpy, openpyxl, seaborn, sqlglot, pyarrow, pyyaml
Maintenance aging — 311 days since the last release
Last repo commit
First released
Downloads 196,434/month — #9,787 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pandasai-3.0.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

natural language data queriesask questions to dataframesLLM-powered data analysisconversational SQL interfacechat with your dataAI data explorationsemantic data queries
llm-powereddata-explorationnatural-language-interface

More Artificial Intelligence packages