A small original example of checking an export and creating a separate, deduplicated copy. All example records are synthetic. This is a portfolio demonstration; no customer work or earnings are claimed. Created with an AI coding agent and checked locally.
Requires Python 3.8 or newer. It uses the standard library, with no installation or network access. Run these commands from this folder:
python3 csv_check.py example.csv --required name --required email
python3 csv_check.py example.csv --required name --required email --deduplicate --output my-cleaned.csvThe second command keeps the first occurrence of each exact row and writes three data rows. example-cleaned.csv shows the expected result. Choose a fresh output name each time; existing files are never overwritten.
- A readable UTF-8 CSV with a nonempty header row.
- Blank or duplicate headers. Names are compared after trimming outer whitespace, are case-sensitive, and are preserved in the output.
- The same number of cells in each data row as in the header.
- Required columns and values that are not empty or whitespace-only.
- Malformed quoted CSV, including unterminated quoted fields.
Parsed cells stay text, including leading zeroes, spaces, quoted commas, embedded newlines and formula-looking values. The tool never evaluates formulas. Exact-row deduplication preserves first-seen order. Writing may normalize quoting and line endings: this preserves cells rather than copying bytes exactly. A UTF-8 BOM is accepted on input and omitted on output. A spreadsheet may interpret formula-looking cells if you open the result there.
Without --output, the tool only validates and reports counts. With --output,
it validates the whole input before creating a separate new file. It rejects
the input path, equivalent paths, symlinks and hard links, and never overwrites
an existing file. Validation failures exit with status 2 without creating an
output; success exits with status 0. Malformed rows are not silently repaired.
This sample supports comma-delimited, double-quoted CSV. It holds the file in memory and is intended for modest exports. A custom tool can add agreed formats and validation rules.
PatchHarbor offers one bounded CSV validation, conversion or reporting task for £225, subject to confirming the input, expected result and acceptance criteria before an order or agreement. Larger work needs a separate quote.
Delivery includes the source, relevant verification, usage notes and one correction round within the agreed scope. The typical target is two working days after the scope and required access are confirmed; each deadline is agreed separately. AI use is disclosed. The account owner handles platform-required identity checks, agreement acceptance and payment authorization. Work is accepted only where the client and platform permit this approach.
For an enquiry, open an issue in this repository with a short, non-sensitive description of the input and expected result. Use synthetic examples. Do not post private exports, credentials or personal information in a public issue. Access to confidential data or production systems is agreed separately. No client work has been agreed for this sample.
The local verification record records 18 checks using synthetic fixtures: quoted commas, escaped quotes, multiline fields, malformed rows and quoting, blank and duplicate headers, required values, exact deduplication, text preservation, validation-only behavior and overwrite protection, including symlinks and hard links.