AI-powered DataFrame processing made simple
Project description
Airow
AI-powered DataFrame processing made simple
Airow is a Python library that combines the power of pandas DataFrames with AI models to process structured data at scale. Built on top of pydantic-ai, it provides type-safe, async processing of DataFrames using any AI model.
Features
- 🚀 Async processing with batch support for high performance
- 🔒 Type-safe outputs using Pydantic models
- 📊 Progress tracking with built-in progress bars
- 🔄 Automatic retries with configurable retry logic
- 🤖 Flexible AI models - works with OpenAI, Ollama, Anthropic, and more
- ⚡ Parallel processing within batches for maximum throughput
- 📝 Structured outputs with defined schemas and validation
Installation
# Using pip
pip install airow
# Using uv (recommended)
uv add airow
# Using conda
conda install -c conda-forge airow
Quick Start
import pandas as pd
from pydantic_ai.models.openai import OpenAIChatModel
from pydantic_ai.providers.ollama import OllamaProvider
from airow import Airow, OutputColumn
import asyncio
async def main():
# Setup your AI model
model = OpenAIChatModel(
model_name="llama3.2:latest",
provider=OllamaProvider(base_url="http://localhost:11434/v1"),
)
# Create Airow instance
airow = Airow(
model=model,
system_prompt="You are an expert in wine tasting and selection.",
)
# Load your data
df = pd.read_csv("wine_data.csv")
output_columns = [
OutputColumn(name="sentiment", type=str, description="Positive, negative, or neutral sentiment"),
OutputColumn(name="confidence", type=float, description="Confidence score between 0 and 1"),
OutputColumn(name="keywords", type=list, description="List of key terms extracted"),
]
# Process with AI
result_df = await airow.run(
df,
prompt="Extract taste characteristics from the wine description",
input_columns=["description"],
output_columns=output_columns,
show_progress=True,
)
print(result_df.head())
if __name__ == "__main__":
asyncio.run(main())
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 airow-0.1.0a1.tar.gz.
File metadata
- Download URL: airow-0.1.0a1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fbd27623985dab7b69e65d630edc78939cce55bd8cbf56eedbf958a461a1b57
|
|
| MD5 |
5f7047c500cef6d9cc776cc3cfd44d0b
|
|
| BLAKE2b-256 |
bf83b249fed27a943ec384a2505edf70198ccd5edc2b5b5234121af679fcf4cf
|
File details
Details for the file airow-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: airow-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b63397b481be1c56e6436349a351df09d4fe34293539ce2664d7c2d006d526a
|
|
| MD5 |
e5eeae60ea78545417254f3ea1b67c52
|
|
| BLAKE2b-256 |
39a6909a4a66d0e4e3655f00283fcc0388bf5ddc34aa7705d09ee9adafd3eb67
|