Google‑native alternative to LangChain's create_pandas_dataframe_agent by Ariamehr A
Project description
Ariamehr's Gemini Pandas Agent
A Google-native alternative to LangChain's create_pandas_dataframe_agent, powered by Gemini and LangGraph.
Created by Ariamehr A
Installation
pip install ariamehr-gemini-pandas-agent
Quick Start
import pandas as pd
import google.generativeai as genai
from ariamehr_gpandas_agent import create_pandas_dataframe_agent
# Configure Gemini
genai.configure(api_key="YOUR_API_KEY")
model = genai.GenerativeModel("gemini-2.0-pro")
# Load your data
df = pd.read_csv("your_data.csv")
# Create the agent
agent = create_pandas_dataframe_agent(model, df, allow_dangerous_code=False)
# Ask questions about your data
response = agent.run("What is the average value in column X?")
print(response)
Features
- 🚀 Powered by Google's Gemini API and LangGraph
- 🔒 Secure Python AST-based code execution
- 📊 Support for single or multiple DataFrames
- 🎯 Simple, LangChain-compatible interface
- 🛡️ Safe by default with optional dangerous code allowance
Security Note
By default, the agent runs in a secure mode that prevents potentially dangerous imports. If you need to allow specific imports, use allow_dangerous_code=True, but be aware of the security implications.
License
MIT License - see LICENSE file for details.
Author
Created by Ariamehr A
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ariamehr_gemini_pandas_agent-0.1.0.tar.gz.
File metadata
- Download URL: ariamehr_gemini_pandas_agent-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aa8c5f95b7ef290673079adeabe9d954a28d85a7c34422c4aeddf48383f4c4d
|
|
| MD5 |
a23b2b70e839233d2897fbcbce9c61a5
|
|
| BLAKE2b-256 |
5b74e6755c61f9d37ae96d6e0a61770df5877fb0686fcf2688ea8b16067cb9fd
|
File details
Details for the file ariamehr_gemini_pandas_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ariamehr_gemini_pandas_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b6c25331b8226286f2d40e5de8b0e33e1a6d1f99ba0e950103e22d881fd542a
|
|
| MD5 |
1516bef0f469368dadfcee98354e68bb
|
|
| BLAKE2b-256 |
25a255518a46f49de452cfb39e245116fa62fea20bef6e0a65b3982dfbec373f
|