Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python CSV Empty-Row Repair Demo

A minimal, dependency-free example of turning a reproducible CSV parsing failure into a tested repair.

This is a self-produced demonstration, not paid client work. It supports the Python & Browser Automation Rescue — 6-Hour Sprint.

The failure

The legacy parser converts every row directly to an integer. A blank row therefore raises ValueError and stops the workflow.

return [int(row) for row in text.splitlines()]

The repair

The corrected parser trims each row, skips only blank rows, and still raises an error for non-empty invalid input. This avoids hiding real data problems.

Verification

Run from this directory with Python 3.9 or newer:

python -m unittest -v test_csv_repair.py

Expected result: three tests pass. The first test preserves the original crash as expected evidence; the second verifies the repair; the third confirms that non-empty invalid input is not silently discarded.

Ran 3 tests

OK

Files

  • csv_repair.py: failing legacy implementation and repaired implementation
  • test_csv_repair.py: regression tests for the failure, repair, and invalid-input boundary

Need help with a broken automation?

The fixed-price rescue sprint covers one reproducible Python or permitted browser-automation failure, including diagnosis, the agreed change, repeatable verification, and concise handoff notes. See the scope before ordering.

About

Minimal Python regression-test demo for repairing blank-row CSV parsing failures.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages