Polars · PII Masking

Polars PII Masking in One Line of Python

Detect and redact names, emails, phone numbers, SSNs, MRNs, and free-text PHI across every column of a Polars DataFrame — locally, with a Rust kernel, in a single call.

The one-line API

import polars as pl
import omna

df = pl.read_parquet("patient_notes.parquet")

# Detect + redact PII across every text column.
masked = df.omna.mask_pii()

# Or target specific entity types
masked = df.omna.mask_pii(entities=["EMAIL", "SSN", "MRN", "PHONE", "NAME"])

Why local matters

Most PII redaction tools (AWS Comprehend, Google DLP, Azure PII) require shipping the raw records to a cloud API. For healthcare, finance, and government workloads, that means a BAA, a vendor review, and a new line item in your data flow diagram. Omna runs in your Python process. Zero network calls. No BAA required, because nothing leaves the host.

Supported entity types

Try it now

pip install omna

The live playground runs a real mask_pii() call on a sample healthcare dataset, in your browser.