[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2311":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":16,"starSnapshotCount":16,"syncStatus":43,"lastSyncTime":44,"discoverSource":45},2311,"pandas-ai","sinaptik-ai\u002Fpandas-ai","sinaptik-ai","Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.","https:\u002F\u002Fpandas-ai.com",null,"Python",23582,2323,171,4,0,1,13,60,7,45,"Other",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39],"ai","csv","data","data-analysis","data-science","data-visualization","database","datalake","gpt-4","llm","pandas","sql","text-to-sql","2026-06-12 02:00:40","# ![PandasAI](assets\u002Flogo.png)\n\n[![Release](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpandasai?label=Release&style=flat-square)](https:\u002F\u002Fpypi.org\u002Fproject\u002Fpandasai\u002F)\n[![CI](https:\u002F\u002Fgithub.com\u002Fsinaptik-ai\u002Fpandas-ai\u002Factions\u002Fworkflows\u002Fci-core.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsinaptik-ai\u002Fpandas-ai\u002Factions\u002Fworkflows\u002Fci-core.yml\u002Fbadge.svg)\n[![CD](https:\u002F\u002Fgithub.com\u002Fsinaptik-ai\u002Fpandas-ai\u002Factions\u002Fworkflows\u002Fcd.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fsinaptik-ai\u002Fpandas-ai\u002Factions\u002Fworkflows\u002Fcd.yml\u002Fbadge.svg)\n[![Coverage](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsinaptik-ai\u002Fpandas-ai\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fsinaptik-ai\u002Fpandas-ai)\n[![Discord](https:\u002F\u002Fdcbadge.vercel.app\u002Fapi\u002Fserver\u002FkF7FqH2FwS?style=flat&compact=true)](https:\u002F\u002Fdiscord.gg\u002FKYKj9F2FRH)\n[![Downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fpandasai)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpandasai) [![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Open in Colab](https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg)](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1ZnO-njhL7TBOYPZaqvMvGtsjckZKrv2E?usp=sharing)\n\nPandasAI 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, 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 PandasAI [here](https:\u002F\u002Fdocs.pandas-ai.com\u002F).\n\n\n## 📚 Using the library\n\n### Python Requirements\n\nPython version `3.8+ \u003C=3.11`\n\n### 📦 Installation\n\nYou can install the PandasAI library using pip or poetry.\n\nWith pip:\n\n```bash\npip install pandasai\npip install pandasai-litellm\n```\n\nWith poetry:\n\n```bash\npoetry add pandasai\npoetry add pandasai-litellm\n```\n\n### 💻 Usage\n\n#### Ask questions\n\n```python\nimport pandasai as pai\nfrom pandasai_litellm.litellm import LiteLLM\n\n# Initialize LiteLLM with your OpenAI model\nllm = LiteLLM(model=\"gpt-4.1-mini\", api_key=\"YOUR_OPENAI_API_KEY\")\n\n# Configure PandasAI to use this LLM\npai.config.set({\n    \"llm\": llm\n})\n\n# Load your data\ndf = pai.read_csv(\"data\u002Fcompanies.csv\")\n\nresponse = df.chat(\"What is the average revenue by region?\")\nprint(response)\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 PandasAI to generate charts for you:\n\n```python\ndf.chat(\n    \"Plot the histogram of countries showing for each one the gdp. Use different colors for each bar\",\n)\n```\n\n![Chart](assets\u002Fhistogram-chart.png?raw=true)\n\n#### Multiple DataFrames\n\nYou can also pass in multiple dataframes to PandasAI and ask questions relating them.\n\n```python\nimport pandasai as pai\nfrom pandasai_litellm.litellm import LiteLLM\n\n# Initialize LiteLLM with your OpenAI model\nllm = LiteLLM(model=\"gpt-4.1-mini\", api_key=\"YOUR_OPENAI_API_KEY\")\n\n# Configure PandasAI to use this LLM\npai.config.set({\n    \"llm\": llm\n})\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\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 PandasAI 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\nfrom pandasai_litellm.litellm import LiteLLM\n\n# Initialize LiteLLM with your OpenAI model\nllm = LiteLLM(model=\"gpt-4.1-mini\", api_key=\"YOUR_OPENAI_API_KEY\")\n\n# Configure PandasAI to use this LLM\npai.config.set({\n    \"llm\": llm\n})\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\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\nPandasAI is available under the MIT expat license, except for the `pandasai\u002Fee` directory of this repository, which has its [license here](https:\u002F\u002Fgithub.com\u002Fsinaptik-ai\u002Fpandas-ai\u002Fblob\u002Fmain\u002Fee\u002FLICENSE).\n\nIf you are interested in managed PandasAI Cloud or self-hosted Enterprise Offering, [contact us](https:\u002F\u002Fpandas-ai.com).\n\n## Resources\n\n- [Docs](https:\u002F\u002Fdocs.pandas-ai.com\u002F) for comprehensive documentation\n- [Examples](examples) for example notebooks\n- [Discord](https:\u002F\u002Fdiscord.gg\u002FKYKj9F2FRH) for discussion with the community and PandasAI 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:\u002F\u002Fcontrib.rocks\u002Fimage?repo=sinaptik-ai\u002Fpandas-ai)](https:\u002F\u002Fgithub.com\u002Fsinaptik-ai\u002Fpandas-ai\u002Fgraphs\u002Fcontributors)\n","PandasAI 是一个 Python 库，它允许用户通过自然语言与数据库或数据湖（如 SQL、CSV、Parquet 文件）进行交互。该项目利用大语言模型 (LLM) 和检索增强生成 (RAG) 技术，使数据分析变得更加直观和高效。其核心功能包括支持多种数据源的查询、自动生成图表以及处理多个 DataFrame 的复杂分析任务。PandasAI 适用于需要快速获取数据洞察但又不希望深入编写代码的数据分析师、商业智能专家及任何对数据有兴趣的人士。",2,"2026-06-11 02:49:25","top_language"]