Skip to main content

The Import Pipeline

Challenge on lesson: Checkpoint: Final Readiness

raw = "coffee,3.5\nBOOK,12\ncoffee,1.5\n,,skip-me\npen,-2" is a messy CSV of category,amount rows. Write ingest(raw) returning a NEW list of clean expenses: skip blank/missing-field lines, skip amounts that are not positive numbers, lowercase categories, round amounts to 2 decimals. Then print the total of the clean list, formatted :.2f (one line).

Difficulty: beginner

Back to lesson: Checkpoint: Final Readiness