ImportGuard · Python · CSV
Check a CSV before importing it
Turn an incoming CSV into the agreed format: map columns, preserve identifiers and separate conflicting records. The report shows where every record went.
source_dirty.csv → CSV
Every record accounted for.
Recorded decisions on the synthetic dataset. Source record numbers exclude the header.
| # | ID | Result |
|---|---|---|
| 01 | 0001 | Ready |
| 02 | 0002 | Conflicting duplicate |
| 03 | 0003 | Missing email |
| 04 | 0004 | Invalid email format |
| 05 | 0005 | Ready |
| 06 | 0001 | Exact duplicate |
| 07 | 0002 | Conflicting duplicate |
| 08 | — | Blank row |
| 09 | 0006 | Ready |
| 10 | 0007 | Missing full name |
| 11 | — | Missing identifier |
| 12 | 0008 | Ready |
| 13 | 0009 | Ready |
| 14 | 0010 | Ready |
14 records shown. No record is unaccounted for.
Inspect the evidence.
A documented example schema. The demonstration does not include an import into a commercial CRM or verify whether email addresses can receive messages.
What to check in a CSV file
Format and columns
Check the delimiter, encoding and headers required by the destination system. This demo reads a semicolon-separated source file, then writes a comma-separated result with columns renamed to a documented schema.
Identifiers as text
Customer codes and phone numbers may start with zero. Treat them as text before opening or transforming a file: if a spreadsheet has already removed leading zeros, the remaining value cannot reliably tell you what was lost.
Required fields
Agree which fields must be present. ImportGuard checks ID, name and email, distinguishing a missing email from an invalid format. A format check does not prove that a mailbox exists.
Duplicates and conflicts
Identical rows and rows sharing an ID but containing different information need different decisions. The demo retains one copy of an exact duplicate and sends both rows for review when their values conflict.
A traceable example: 14 rows, none lost
The code “ 0001 ” becomes “0001”, preserving its leading zeros; the first row’s email is converted to lowercase. Code 0002 appears with two different emails: both rows are isolated without deciding which is correct. The result reconciles 14 source rows with 6 validated rows and 8 for review. The files above let you follow each record and its reason for inclusion or review.
When a dedicated workflow is useful
For a one-off import, the destination system’s CSV template and built-in validation may be enough. A dedicated check is useful for recurring exports, changing column names or rules that need consistent application. Calling a file ready for your CRM requires checking its actual schema and testing an import in an agreed environment.
What to include in your enquiry
Describe the destination software, column names, export frequency and required rules. Headers and invented example rows are enough for an initial assessment; customer data is unnecessary.
Scope, price and acceptance termsFrom the example to your workflow: scope and acceptance