// PYTHON LIBRARY
ask()
`df.omna.ask(question)` answers a plain-English question about your DataFrame using Claude. It is the one method that makes a network call — and even then, the sample rows in the prompt are masked before they leave your machine.
Signature
df.omna.ask(question, model=..., mask_rows=True)| Parameter | Description |
|---|---|
question | The question to ask, in plain English |
model | Override the Claude model. Default: claude-haiku-4-5-20251001 |
mask_rows | Mask PII in the sampled rows before they leave your machine (default True). Pass False for synthetic or public data |
ask() sends the schema plus up to 20 sample rows to Claude and requires an ANTHROPIC_API_KEY.
export ANTHROPIC_API_KEY=sk-ant-...Example
import polars as pl
import omna
df = pl.read_csv("documents.csv")
results = df.omna.search("insurance claim denied", on="text", k=5)
results.omna.ask("What personal data do these documents expose?")
# → "These insurance documents expose SSNs, medical record numbers,
# dates of birth, health plan numbers, and claimant identifiers."
# Override the model
results.omna.ask("Summarise the key themes", model="claude-sonnet-4-6")Note: Privacy by default — the sampled rows in the prompt are masked before they leave your machine (PII replaced with tokens, secrets redacted). Pass
mask_rows=False only for synthetic or public data.