PandaAI

Ask questions to your data in natural language

2025-03-14

Overview

PandaAI is a powerful Python platform designed to bridge the gap between data analysis and natural language interaction. It allows users to query their data in plain English, making data analytics accessible to non-technical users while saving time for technical users. The platform integrates seamlessly with Jupyter notebooks, Streamlit apps, and supports a client-server architecture for scalable deployments.

Key Features

  • Natural Language Queries: Ask complex questions about your data using simple English sentences.
  • Multi-DataFrame Support: Analyze relationships across multiple datasets with ease.
  • Visualization Generation: Automatically generate charts and graphs based on your queries.
  • Docker Sandbox: Execute queries in a secure, isolated environment to prevent malicious attacks.
  • Cloud & Enterprise Options: Available as a managed cloud service or self-hosted enterprise solution.

Getting Started

PandaAI supports Python 3.8+ and can be installed via pip or poetry. After installation, users can start querying their data with just a few lines of code. The platform defaults to using BambooLLM for natural language processing, with API keys available for free through the PandaAI platform.

Example Usage

```python import pandasai as pai

Sample DataFrame

df = pai.DataFrame({ "country": ["United States", "United Kingdom", "France", "Germany", "Italy", "Spain", "Canada", "Australia", "Japan", "China"], "revenue": [5000, 3200, 2900, 4100, 2300, 2100, 2500, 2600, 4500, 7000] })

pai.api_key.set("your-pai-api-key") df.chat('Which are the top 5 countries by sales?') ```

Community & Contribution

PandaAI is open-source under the MIT license (with exceptions for enterprise features). The community is encouraged to contribute through GitHub issues and pull requests. Join the discussion on Discord to connect with the team and other users.

Beta Notice

The current version (v3) is in beta, with ongoing improvements and features being added. Users are advised to check the documentation and examples for the latest updates.

Data Analytics Natural Language Processing Python Machine Learning Conversational AI