Skip to main content

Natural language interface for pandas DataFrame analysis using Ollama models

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

pandas-ollama

Natural language interface for pandas DataFrame analysis using Ollama models.

Installation

pip install pandas-ollama

Requirements

  • Python 3.7+
  • Ollama server running locally or remotely
  • Required packages: pandas, matplotlib, seaborn, requests

Quick Start

import pandas as pd
from pandas_ollama import MyPandasAI

# Create a DataFrame
df = pd.DataFrame({
    'Product': ['Laptop', 'Phone', 'Tablet'],
    'Price': [1000, 800, 500],
    'Stock': [50, 100, 75]
})

# Create PandasOllama instance
panoll = MyPandasAI(df, model="llama3:latest")

# Ask a question about your data
result = panoll.ask("What is the average price of products?")
print(result.content)

# Create a visualization
result = panoll.plot("Show the distribution of prices", viz_type="bar")

# Display the visualization in a notebook
if result.visualization:
    import base64
    from IPython.display import Image
    image_data = base64.b64decode(result.visualization)
    Image(data=image_data)

Features

  • Natural language querying of pandas DataFrames
  • Automatic visualization generation
  • Support for various chart types: bar, line, scatter, hist, pie, heatmap, and more
  • Intelligent data type detection
  • Data transformation through natural language commands

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pandas_ollama-1.0.2.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pandas_ollama-1.0.2-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file pandas_ollama-1.0.2.tar.gz.

File metadata

  • Download URL: pandas_ollama-1.0.2.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pandas_ollama-1.0.2.tar.gz
Algorithm Hash digest
SHA256 647293cade19f6a59daa450c1a8390f408cdf9fe1536e3a399ca30955b69f3f9
MD5 79449f424c926c860ce641f1ff68cf6f
BLAKE2b-256 10627ee7f315bfc8de84c3b865f53266bacbf6322d41b657d18149d021dc3a15

See more details on using hashes here.

File details

Details for the file pandas_ollama-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pandas_ollama-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pandas_ollama-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8308a0327eae6f6056f194bbfadec32d2fe36f67fd91aeb00ccde806b29f9841
MD5 563caa27650484f0ac512e80652c359f
BLAKE2b-256 659446a04c3f5a02f73d5e0c3eb33a41ba43620060987161b1d7a8fd516b8085

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page