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"),
)
# or use strings:
model = "openai:gpt-5"
model = "anthropic:claude-sonnet-4-0"
# 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="Analyze the wine description and provide sentiment analysis, confidence score, and extract key terms.",
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
airow-0.1.0.tar.gz
(7.4 kB
view details)
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
airow-0.1.0-py3-none-any.whl
(6.7 kB
view details)
File details
Details for the file airow-0.1.0.tar.gz.
File metadata
- Download URL: airow-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d74af35e8f8812e67f8619c27323f9d2b6dc68ab9f6fb492673d17ab369c08f
|
|
| MD5 |
5c759a05b84fc92bc4d84530f7404e9a
|
|
| BLAKE2b-256 |
76a2415ec08b841588bf04180c4958113dd98155424375ba8644836d5a1fb617
|
File details
Details for the file airow-0.1.0-py3-none-any.whl.
File metadata
- Download URL: airow-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b3720afc905303f153d74116923cd82b55e84e2a0a7e080413e797848fbecb0
|
|
| MD5 |
91269b39380ba5c6e7e71a8638bc6e6b
|
|
| BLAKE2b-256 |
1736fa115118556f54acd763d2dbd0da380976914a6da7b5f9d3b0f5a5160d39
|