Your data analyst is now a chatbot
PandasAI wraps pandas in an LLM so you can ask CSVs plain-English questions instead of writing groupby statements.

What it does PandasAI is a Python library that lets you interrogate dataframes, SQL databases, and data lakes by typing questions like “What is the average revenue by region?” It generates the code, runs it, and returns an answer or a chart. It also handles joins across multiple dataframes when you pass them in together.
The interesting bit
The library doesn’t just prompt an LLM and hope for the best. It can spin up a Docker sandbox to execute the generated code in isolation, which is a sensible hedge against an LLM hallucinating a rm -rf / instead of a bar chart.
Key highlights
- Supports CSV, Parquet, SQL, and data lake sources
- Plugs into multiple LLMs via the optional
pandasai-litellmadapter - Generates matplotlib charts from natural language descriptions
- Cross-dataframe queries with automatic join inference
- Optional Docker sandbox for untrusted code execution
- MIT licensed, with a separate enterprise directory (
pandasai/ee) for paid features
Caveats
- Requires Python between 3.8 and 3.11; newer versions are explicitly unsupported
- The README examples all use OpenAI, so support for local or non-OpenAI models is theoretically present via LiteLLM but not demonstrated
- The enterprise/cloud offering is mentioned but not detailed in the open-source repo
Verdict Worth a look if you build internal analytics tools for non-technical users, or if you just want to prototype questions without writing pandas boilerplate. Skip it if you need deterministic, auditable SQL generation or can’t tolerate occasional LLM hallucinations in your data pipeline.