Thomas Piacentini
← Atelier

Projet

CSV Repair Workbench

Texte original · anglais480 min

Help a spreadsheet owner repair inconsistent labels, dates and missing values through an explicit sequence of transformations. Preview every changed cell, keep ambiguous cases for review, and export a cleaned CSV with a reusable transformation recipe and HTML comparison.

The implementation uses Python 3.10+ and standard libraries. Samples are original teaching data. Read API.md for exact input, output and error contracts.

Build your version

bash
python3 scripts/project_test.py csv-repair-workbench --init learning-artifacts/csv-repair-workbench
python3 scripts/project_test.py csv-repair-workbench --stage 1 --path learning-artifacts/csv-repair-workbench --strict

A fresh starter fails clearly until you implement the first contract. Later stages retain your source file. The supplied CLI and presentation helpers are scaffolding; all domain decisions call your implementation.

bash
python3 scripts/project_test.py csv-repair-workbench --all --path learning-artifacts/csv-repair-workbench --strict
cd learning-artifacts/csv-repair-workbench
python3 cli.py samples/input.json --output my-output

Run the reference and your own input

bash
python3 scripts/project_test.py csv-repair-workbench --all --solution --strict
cd projects/csv-repair-workbench/solution
python3 cli.py samples/input.json --output demo-output
python3 cli.py /absolute/path/to/your-input.json --output your-output

The JSON input contains csv text, aliases and date_columns. Outputs are cleaned.csv, recipe.json, receipt.json and review.html. Download decisions.json from the HTML, add {row,column,value} entries to cells, and run the same command with --decisions decisions.json. Replay the exported recipe on another compatible table with --recipe recipe.json. Read cleaned.csv with csv.DictReader as the downstream consumer.

Worked example and limits

The sample has North Garden, north garden and N. Garden. Keep their original spelling and row numbers before changing anything.

Only slash dates and ISO dates are recognized. Reviews resolve pending date cells; no locale or semantic inference is claimed.

Stages

  1. Profile columns and retain original cells
  2. Propose explicit normalization rules
  3. Preview changes and review ambiguous values
  4. Export a reusable repair recipe and cleaned table

Primary references

Code et livrables 28
Ce que vous en retenez

Enregistré dans votre carnet sur cet appareil.

Sources et limites

Les repères de lecture sont déclaratifs. Les résultats de tests sont enregistrés séparément ; ils valent pour les cas exécutés.

AI Engineering from Scratch · 3f9715c · MIT

Télécharger ce fichier ↓