PandaAI is a powerful Python platform designed to bridge the gap between complex data analysis and natural language interaction. It allows users to ask questions to their data in plain English, making data analytics accessible to non-technical users while saving time and effort for technical users.
Key Features:
- Natural Language Queries: Interact with your data using simple English questions.
- Multiple Integration Options: Use PandaAI in Jupyter notebooks, Streamlit apps, or via a client-server architecture.
- End-to-End Analytics: Seamlessly integrate with a powerful data platform for comprehensive conversational analytics.
- Chart Generation: Automatically generate visualizations based on natural language requests.
- Multi-DataFrame Support: Ask questions that relate multiple datasets together.
- Secure Execution: Run queries in a Docker sandbox for enhanced security.
Installation is straightforward with pip or poetry:
pip install "pandasai>=3.0.0b2"
or
poetry add "pandasai>=3.0.0b2"
Example Usage:
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")
# Simple query
print(df.chat('Which are the top 5 countries by sales?'))
# Complex query
print(df.chat("What is the total sales for the top 3 countries by sales?"))
# Visualization request
df.chat("Plot the histogram of countries showing for each one the revenue. Use different colors for each bar")
PandaAI also supports Docker sandboxing for secure execution and offers enterprise solutions for managed cloud or self-hosted deployments. The platform is currently in beta, with active development and community contributions welcome.