Turn common AI data-processing tasks into simple pandas DataFrame operations.
Project description
Homogene
Homogene is a Python library that helps data scientists apply LLM instructions to every row of a pd.DataFrame for data processing.
Running an LLM over a pd.DataFrame column is easy for 10 rows. At 10,000 rows, you're managing threads, catching per-row errors, and checkpointing progress. Homogene handles all of that so you focus on the instruction, not the infrastructure.
Processors
Homogene currently ships with one processor: Generator, which applies a plain-text instruction to every row of a pd.DataFrame independently and in parallel. More processors are coming soon.
Homogene uses LiteLLM to route model calls. Please refer to their documentation for the full list of supported models.
Install
pip install homogene
Quick start
import os
import pandas as pd
from homogene import Generator
os.environ["OPENAI_API_KEY"] = "your-api-key"
df = pd.read_csv("tickets.csv")
generator = Generator(
df=df,
columns=["subject", "body"],
instruction="Identify the main topic of this support ticket in three words or less.",
model="gpt-5.5",
)
df["topic"] = generator.run()
For a full walkthrough see the Generator example notebook, covering:
- Model configuration
- Freeform generation
- Structured output
- Prompt inspection
- Subset runs
- Checkpointing
- Error handling
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 homogene-0.1.0.tar.gz.
File metadata
- Download URL: homogene-0.1.0.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02cad7b5a737c751d8a9a16accf38972eca840fa201fc7c74f93a9a99d906f7e
|
|
| MD5 |
6d3cb80a301e8ec17df3bd84d25d8e00
|
|
| BLAKE2b-256 |
b9694b1cd8ba0411d7f9ef0750f4bfaa7450e8473865a537bd152769ab8f2988
|
File details
Details for the file homogene-0.1.0-py3-none-any.whl.
File metadata
- Download URL: homogene-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c834ef40a848d316f6abe0554d54252025ea2cdcbcac33295cb5df75b504f234
|
|
| MD5 |
ce155e48bd1174542e1332c73dbe02a2
|
|
| BLAKE2b-256 |
87f1f95073f2a446f54ac0e68f37e6b2d044c1bffe17e4cbf00341ae1062987f
|