A Python library that lets developers and data teams query CSV, parquet, SQL, and DataFrame sources using natural language via an external LLM. It returns natural language responses and charts, and requires Python knowledge plus a configured external model to operate.
Project overview
It reduces the effort required to explore datasets by translating natural language questions into Python-based analysis through a configured LLM provider.
Project type
RAG · Data Processing · Prompt Engineering
Use cases
Knowledge Q&A · Data Analysis
Deployment
Refer to project documentation
License
License pending
Best for
Technical users and developers who want to query local DataFrames, CSV, or SQL data through a Python library using natural language.
Key capabilities
Allows users to interact with data structures such as DataFrames, CSV, SQL, and parquet by asking questions in natural language.
Generates charts and visualizations directly from natural language prompts.
Supports passing multiple dataframes to PandasAI to ask questions that relate them.
Provides a secure, isolated Docker environment to execute generated code safely and mitigate the risk of malicious attacks.
Limitations and risks
Python version 3.8 or higher up to and including 3.11 is required to use the library.
Code execution risks exist during operation, which are mitigated by the Docker sandbox environment.
Getting started
Install the package via pip, configure LiteLLM with an external API key, load a CSV file, and invoke the chat function to query the data.
Evidence and sources
GitHub project description: Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.
README: 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,…
README: response = df.chat("What is the average revenue by region?")