Skip to main content

Airow

AI-powered DataFrame processing made simple

Airow is a Python library that combines pandas or Polars 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

# Core library without a DataFrame backend
pip install airow

# pandas only
pip install "airow[pandas]"

# Polars only
pip install "airow[polars]"

# pandas and Polars
pip install "airow[all]"

Pandas example

Install Airow with the pandas backend:

pip install "airow[pandas]"

The examples use Pydantic AI's openai:gpt-5 model string, so configure the corresponding provider credentials before running them.

import asyncio

import pandas as pd

from airow import Airow, OutputColumn


async def main():
    df = pd.DataFrame(
        {
            "description": [
                "Bright citrus flavors with a crisp finish.",
                "Rich dark fruit with firm tannins.",
            ]
        }
    )

    airow = Airow(
        model="openai:gpt-5",
        system_prompt="You are an expert in wine tasting and selection.",
        batch_size=2,
    )

    output_columns = [
        OutputColumn(
            name="summary",
            type=str,
            description="A concise summary of the wine",
        ),
        OutputColumn(
            name="style",
            type=str,
            description="The inferred wine style",
        ),
    ]

    result_df = await airow.run(
        df,
        prompt="Analyze this wine description.",
        input_columns=["description"],
        output_columns=output_columns,
        show_progress=True,
    )

    # result_df is a pandas.DataFrame; df is unchanged.
    print(result_df.head())


if __name__ == "__main__":
    asyncio.run(main())

Airow detects pandas automatically and returns a new pandas.DataFrame.

Polars example

Install Airow with the Polars backend:

pip install "airow[polars]"
import asyncio

import polars as pl

from airow import Airow, OutputColumn


async def main():
    df = pl.DataFrame(
        {
            "description": [
                "Bright citrus flavors with a crisp finish.",
                "Rich dark fruit with firm tannins.",
            ]
        }
    )

    airow = Airow(
        model="openai:gpt-5",
        system_prompt="You are an expert in wine tasting and selection.",
        batch_size=2,
    )

    output_columns = [
        OutputColumn(
            name="summary",
            type=str,
            description="A concise summary of the wine",
        ),
        OutputColumn(
            name="style",
            type=str,
            description="The inferred wine style",
        ),
    ]

    result_df = await airow.run(
        df,
        prompt="Analyze this wine description.",
        input_columns=["description"],
        output_columns=output_columns,
        show_progress=True,
    )

    # result_df is a polars.DataFrame; df is unchanged.
    print(result_df.head())


if __name__ == "__main__":
    asyncio.run(main())

Airow detects eager Polars DataFrames automatically and returns a new polars.DataFrame. LazyFrames are not currently supported.

Custom backends

Custom dataframe implementations can subclass DataFrameBackend and pass an instance explicitly:

from airow import Airow, DataFrameBackend

backend: DataFrameBackend = MyDataFrameBackend()
airow = Airow(
    model="openai:gpt-5",
    system_prompt="You are a data processing assistant.",
    backend=backend,
)

Metadata

Release files for airow 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airow 0.2.0
File Size Uploaded
airow-0.2.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for airow 0.2.0
File Interpreter ABI Platform
airow-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / airow-0.2.0.tar.gz

Download URL airow-0.2.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d1350a752c86b358f82856edd76e8b2e90394b46881926a3592cb924a8255da
BLAKE2b-256 checksum
How to use checksums
c56319ee595f262bfcf140083e9fa39f4237d475943ebaadb3f40b163b693333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.

Transparency log

Release files / airow-0.2.0-py3-none-any.whl

Download URL airow-0.2.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b060f5ac17230557893a444ec7327f067e343bcce2d0a721f0e935252ea93b0c
BLAKE2b-256 checksum
How to use checksums
5a3ab8542cbfcd5e260fd90973ffebe2508df99a411da68504d71e794625d081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page