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.
Metadata
Release files for ariamehr-gemini-pandas-agent 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ariamehr_gemini_pandas_agent-0.1.0.tar.gz | 5.4 kB | Without provenance | Details for ariamehr_gemini_pandas_agent-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ariamehr_gemini_pandas_agent-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ariamehr_gemini_pandas_agent-0.1.0-py3-none-any.whl |
Total release size: 13.0 kB
Release files / ariamehr_gemini_pandas_agent-0.1.0.tar.gz
| Download URL | ariamehr_gemini_pandas_agent-0.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6aa8c5f95b7ef290673079adeabe9d954a28d85a7c34422c4aeddf48383f4c4d
|
|
BLAKE2b-256 checksum How to use checksums |
5b74e6755c61f9d37ae96d6e0a61770df5877fb0686fcf2688ea8b16067cb9fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / ariamehr_gemini_pandas_agent-0.1.0-py3-none-any.whl
| Download URL | ariamehr_gemini_pandas_agent-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b6c25331b8226286f2d40e5de8b0e33e1a6d1f99ba0e950103e22d881fd542a
|
|
BLAKE2b-256 checksum How to use checksums |
25a255518a46f49de452cfb39e245116fa62fea20bef6e0a65b3982dfbec373f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for ariamehr-gemini-pandas-agent 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.