-
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
benzsevern edited this page Mar 29, 2026
·
1 revision
pip install infermap| Extra | What it adds |
|---|---|
infermap[postgres] |
PostgreSQL support via psycopg2 |
infermap[mysql] |
MySQL support |
infermap[duckdb] |
DuckDB support |
infermap[excel] |
Excel file support via openpyxl |
infermap[all] |
Everything |
import infermap
# Map a messy CRM export to a clean target schema
result = infermap.map("crm_export.csv", "canonical_customers.csv")
# See what matched and why
for m in result.mappings:
print(f"{m.source} -> {m.target} (confidence: {m.confidence:.2f})")
print(f" Reasoning: {m.reasoning}")
# Remap a DataFrame
remapped = result.apply(source_df)
# Save for reuse (skips inference next time)
result.to_config("mapping.yaml")result = infermap.map(
"incoming.csv",
"postgresql://user:pass@host/db",
table="customers",
required=["email", "phone"],
)The DB provider introspects the live schema at runtime — if columns change, the mapping adapts automatically.
# Map two files
infermap map source.csv target.csv
# See what's in a file
infermap inspect source.csv
# Save and reuse a mapping
infermap map source.csv target.csv -o mapping.yaml
infermap apply new_data.csv --config mapping.yaml -o remapped.csv
# CI gate: fail if required fields aren't mapped
infermap validate source.csv --config mapping.yaml --strict --required email,phone