{"id":13465576,"url":"https://github.com/Sinaptik-AI/pandas-ai","last_synced_at":"2025-03-25T16:32:28.924Z","repository":{"id":154481833,"uuid":"631258918","full_name":"sinaptik-ai/pandas-ai","owner":"sinaptik-ai","description":"Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.","archived":false,"fork":false,"pushed_at":"2025-03-18T11:51:59.000Z","size":56946,"stargazers_count":18162,"open_issues_count":26,"forks_count":1692,"subscribers_count":141,"default_branch":"main","last_synced_at":"2025-03-18T16:05:12.658Z","etag":null,"topics":["ai","csv","data","data-analysis","data-science","data-visualization","database","datalake","gpt-4","llm","pandas","sql","text-to-sql"],"latest_commit_sha":null,"homepage":"https://getpanda.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinaptik-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-22T12:58:01.000Z","updated_at":"2025-03-18T15:59:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6d19693-6315-455b-b8ca-a35d3198d1b1","html_url":"https://github.com/sinaptik-ai/pandas-ai","commit_stats":{"total_commits":997,"total_committers":102,"mean_commits":9.77450980392157,"dds":0.4563691073219659,"last_synced_commit":"48664d73551e0dfee34ec843d92dac6df1504ccf"},"previous_names":["gventuri/pandas-ai"],"tags_count":203,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaptik-ai%2Fpandas-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaptik-ai%2Fpandas-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaptik-ai%2Fpandas-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinaptik-ai%2Fpandas-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinaptik-ai","download_url":"https://codeload.github.com/sinaptik-ai/pandas-ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245500396,"owners_count":20625572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","csv","data","data-analysis","data-science","data-visualization","database","datalake","gpt-4","llm","pandas","sql","text-to-sql"],"created_at":"2024-07-31T15:00:32.099Z","updated_at":"2025-03-25T16:32:28.917Z","avatar_url":"https://github.com/sinaptik-ai.png","language":"Python","funding_links":[],"categories":["Python","AI Agent","ai","📊 Data and Research Agents","🏷️ Data Labeling \u0026 Curation"],"sub_categories":["Task","Data Analysis","Weak Supervision \u0026 Auto-Labeling"],"readme":"# ![PandaAI](assets/logo.png)\n\n[![Release](https://img.shields.io/pypi/v/pandasai?label=Release\u0026style=flat-square)](https://pypi.org/project/pandasai/)\n[![CI](https://github.com/sinaptik-ai/pandas-ai/actions/workflows/ci-core.yml/badge.svg)](https://github.com/sinaptik-ai/pandas-ai/actions/workflows/ci-core.yml/badge.svg)\n[![CD](https://github.com/sinaptik-ai/pandas-ai/actions/workflows/cd.yml/badge.svg)](https://github.com/sinaptik-ai/pandas-ai/actions/workflows/cd.yml/badge.svg)\n[![Coverage](https://codecov.io/gh/sinaptik-ai/pandas-ai/branch/main/graph/badge.svg)](https://codecov.io/gh/sinaptik-ai/pandas-ai)\n[![Discord](https://dcbadge.vercel.app/api/server/kF7FqH2FwS?style=flat\u0026compact=true)](https://discord.gg/KYKj9F2FRH)\n[![Downloads](https://static.pepy.tech/badge/pandasai)](https://pepy.tech/project/pandasai) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1ZnO-njhL7TBOYPZaqvMvGtsjckZKrv2E?usp=sharing)\n\nPandaAI is a Python platform 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, and it helps technical users to save time, and effort when working with data.\n\n# 🔧 Getting started\n\nYou can find the full documentation for PandaAI [here](https://pandas-ai.readthedocs.io/en/latest/).\n\nYou can either decide to use PandaAI in your Jupyter notebooks, Streamlit apps, or use the client and server architecture from the repo.\n\n## ☁️ Using the platform\n\nThe library can be used alongside our powerful data platform, making end-to-end conversational data analytics possible with as little as a few lines of code.\n\nLoad your data, save them as a dataframe, and push them to the platform\n\n```python\nimport pandasai as pai\n\npai.api_key.set(\"your-pai-api-key\")\n\nfile = pai.read_csv(\"./filepath.csv\")\n\ndataset = pai.create(path=\"your-organization/dataset-name\",\n    df=file,\n    name=\"dataset-name\",\n    description=\"dataset-description\")\n\ndataset.push()\n```\n\nYour team can now access and query this data using natural language through the platform.\n\n![PandaAI](assets/demo.gif)\n\n## 📚 Using the library\n\n### Python Requirements\n\nPython version `3.8+ \u003c3.12`\n\n### 📦 Installation\n\nYou can install the PandaAI library using pip or poetry.\n\nWith pip:\n\n```bash\npip install \"pandasai\u003e=3.0.0b2\"\n```\n\nWith poetry:\n\n```bash\npoetry add \"pandasai\u003e=3.0.0b2\"\n```\n\n### 💻 Usage\n\n#### Ask questions\n\n```python\nimport pandasai as pai\n\n# Sample DataFrame\ndf = pai.DataFrame({\n    \"country\": [\"United States\", \"United Kingdom\", \"France\", \"Germany\", \"Italy\", \"Spain\", \"Canada\", \"Australia\", \"Japan\", \"China\"],\n    \"revenue\": [5000, 3200, 2900, 4100, 2300, 2100, 2500, 2600, 4500, 7000]\n})\n\n# By default, unless you choose a different LLM, it will use BambooLLM.\n# You can get your free API key signing up at https://app.pandabi.ai (you can also configure it in your .env file)\npai.api_key.set(\"your-pai-api-key\")\n\ndf.chat('Which are the top 5 countries by sales?')\n```\n\n```\nChina, United States, Japan, Germany, Australia\n```\n\n---\n\nOr you can ask more complex questions:\n\n```python\ndf.chat(\n    \"What is the total sales for the top 3 countries by sales?\"\n)\n```\n\n```\nThe total sales for the top 3 countries by sales is 16500.\n```\n\n#### Visualize charts\n\nYou can also ask PandaAI to generate charts for you:\n\n```python\ndf.chat(\n    \"Plot the histogram of countries showing for each one the gd. Use different colors for each bar\",\n)\n```\n\n![Chart](assets/histogram-chart.png?raw=true)\n\n#### Multiple DataFrames\n\nYou can also pass in multiple dataframes to PandaAI and ask questions relating them.\n\n```python\nimport pandasai as pai\n\nemployees_data = {\n    'EmployeeID': [1, 2, 3, 4, 5],\n    'Name': ['John', 'Emma', 'Liam', 'Olivia', 'William'],\n    'Department': ['HR', 'Sales', 'IT', 'Marketing', 'Finance']\n}\n\nsalaries_data = {\n    'EmployeeID': [1, 2, 3, 4, 5],\n    'Salary': [5000, 6000, 4500, 7000, 5500]\n}\n\nemployees_df = pai.DataFrame(employees_data)\nsalaries_df = pai.DataFrame(salaries_data)\n\n# By default, unless you choose a different LLM, it will use BambooLLM.\n# You can get your free API key signing up at https://app.pandabi.ai (you can also configure it in your .env file)\npai.api_key.set(\"your-pai-api-key\")\n\npai.chat(\"Who gets paid the most?\", employees_df, salaries_df)\n```\n\n```\nOlivia gets paid the most.\n```\n\n#### Docker Sandbox\n\nYou can run PandaAI in a Docker sandbox, providing a secure, isolated environment to execute code safely and mitigate the risk of malicious attacks.\n\n##### Python Requirements\n\n```bash\npip install \"pandasai-docker\"\n```\n\n##### Usage\n\n```python\nimport pandasai as pai\nfrom pandasai_docker import DockerSandbox\n\n# Initialize the sandbox\nsandbox = DockerSandbox()\nsandbox.start()\n\nemployees_data = {\n    'EmployeeID': [1, 2, 3, 4, 5],\n    'Name': ['John', 'Emma', 'Liam', 'Olivia', 'William'],\n    'Department': ['HR', 'Sales', 'IT', 'Marketing', 'Finance']\n}\n\nsalaries_data = {\n    'EmployeeID': [1, 2, 3, 4, 5],\n    'Salary': [5000, 6000, 4500, 7000, 5500]\n}\n\nemployees_df = pai.DataFrame(employees_data)\nsalaries_df = pai.DataFrame(salaries_data)\n\n# By default, unless you choose a different LLM, it will use BambooLLM.\n# You can get your free API key signing up at https://app.pandabi.ai (you can also configure it in your .env file)\npai.api_key.set(\"your-pai-api-key\")\n\npai.chat(\"Who gets paid the most?\", employees_df, salaries_df, sandbox=sandbox)\n\n# Don't forget to stop the sandbox when done\nsandbox.stop()\n```\n\n```\nOlivia gets paid the most.\n```\n\nYou can find more examples in the [examples](examples) directory.\n\n## 📜 License\n\nPandaAI is available under the MIT expat license, except for the `pandasai/ee` directory of this repository, which has its [license here](https://github.com/sinaptik-ai/pandas-ai/blob/main/ee/LICENSE).\n\nIf you are interested in managed PandaAI Cloud or self-hosted Enterprise Offering, [contact us](https://getpanda.ai/pricing).\n\n## Resources\n\n\u003e **Beta Notice**  \n\u003e Release v3 is currently in beta. The following documentation and examples reflect the features and functionality in progress and may change before the final release.\n\n- [Docs](https://pandas-ai.readthedocs.io/en/latest/) for comprehensive documentation\n- [Examples](examples) for example notebooks\n- [Discord](https://discord.gg/KYKj9F2FRH) for discussion with the community and PandaAI team\n\n## 🤝 Contributing\n\nContributions are welcome! Please check the outstanding issues and feel free to open a pull request.\nFor more information, please check out the [contributing guidelines](CONTRIBUTING.md).\n\n### Thank you!\n\n[![Contributors](https://contrib.rocks/image?repo=sinaptik-ai/pandas-ai)](https://github.com/sinaptik-ai/pandas-ai/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSinaptik-AI%2Fpandas-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSinaptik-AI%2Fpandas-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSinaptik-AI%2Fpandas-ai/lists"}