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.3.tar.gz (29.1 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.3-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pandas_ollama-1.0.3.tar.gz
Algorithm Hash digest
SHA256 2193fc6093f22e51e12760dee2010b7d3e1c4d475b9b40229bb16d43e1e97eba
MD5 c5651ad046d786a3cf00c036ae3dd9c3
BLAKE2b-256 e99739f9743d9c9edf615a7fdb4ee2cc969461cf9956d916b84a00f5c57dc532

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pandas_ollama-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c15c9f9d69c4bb36f0d370020c31da55600d2590f149aa8d1ff91571a3a15c
MD5 c4cdbc916fc0f64372f10a3bb4af56fe
BLAKE2b-256 511ba7e2dd05eb2ac669ad5cd0decd6f2454942d14a1422d0c03d1adb61b13d4

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