pandasai-litellm
LiteLLM integration for PandaAI
What it is and what it does
pandasai-litellm is a bridge between pandasai and litellm, allowing you to ask natural-language questions about your data using any language model that litellm can route to. Instead of writing pandas code or SQL, you configure a LiteLLM instance with your chosen model and API key, then call methods like `df.chat()` to query dataframes conversationally. The package handles translation of natural language into executable pandas operations and can generate charts on request.
It depends on pandasai (the core data-querying engine) and litellm (the multi-provider LLM abstraction layer). The package is minimal—just the integration glue—and installs with low friction. However, it has not been updated since its 0.0.1 release, and requires Python 3.8 to 3.11, which may limit adoption on newer environments.
Use it for:
- Enable non-technical users to explore CSV or dataframe data by asking questions in plain English without learning pandas syntax.
- Quickly prototype data analysis workflows by chatting with your data instead of writing boilerplate pandas code.
- Generate exploratory visualizations by describing them in natural language.
- Analyze multiple related dataframes together by asking cross-dataset questions in a single query.
- Switch between LLM providers without changing your pandasai code, leveraging litellm's routing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates LiteLLM with PandasAI to enable natural-language queries against dataframes using any LLM provider that LiteLLM supports.
Yes, if you want to use pandasai with a non-OpenAI LLM provider or need litellm's multi-provider routing. The package is lightweight and permissively licensed. However, the 0.0.1 version and absence of updates since release suggest early-stage maturity; verify compatibility with your target Python version and litellm setup before committing to production use.
Install
pandasai-litellm on PyPI
pip
pip install pandasai-litellmuv
uv add pandasai-litellmpoetry
poetry add pandasai-litellmInstalling pandasai-litellm
Before you install
Low install friction; a pure-Python wheel with only two runtime dependencies (pandasai and litellm). Maintenance status is aging—no updates since initial release on 2025-03-11.
License in practice
MIT permissive license; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install pandasai pandasai-litellm
import pandasai as pai
from pandasai_litellm.litellm import LiteLLM
llm = LiteLLM(model="gpt-4.1-mini", api_key="YOUR_OPENAI_API_KEY")
pai.config.set({"llm": llm})
df = pai.read_csv("data/companies.csv")
response = df.chat("What is the average revenue by region?")
print(response)
Requires Python 3.8 to 3.11; does not support Python 3.12 or later.
Verify before relying
- Whether LiteLLM integration is feature-complete relative to other PandasAI LLM backends.
- Stability and breaking-change risk given the 0.0.1 version and lack of updates since release.
- Production readiness and whether the package is actively maintained.
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 | 2 — pandasai, litellm |
| Maintenance | aging — 521 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,090/month — #14,250 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pandasai_litellm-0.0.1-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
pandasaiPandasAI lets you ask questions about your data…
permissive · top 15,000 on PyPI
llama-index-llms-litellmIntegrates LiteLLM with LlamaIndex to provide…
permissive · top 15,000 on PyPI
litellm-enterpriseLiteLLM Enterprise provides a unified Python…
unclear · top 5,000 on PyPI
unclecode-litellmUnified Python interface to call many LLM…
permissive · top 5,000 on PyPI
any-llm-sdkProvides a unified Python interface to…
permissive · top 15,000 on PyPI
vannaVanna converts natural language questions into…
permissive · top 15,000 on PyPI
litellm-proxy-extrasProvides supplementary files for the LiteLLM…
permissive · top 5,000 on PyPI
pandasqlpandasql lets you query pandas DataFrames using…
unclear · top 5,000 on PyPI
opentelemetry-instrumentation-litellmAdds OpenTelemetry tracing to LiteLLM,…
permissive · top 15,000 on PyPI