Prepare a tiny input file
Create a CSV with the headers category,amount and five sample rows. Include repeated categories and one empty amount.
Checkpoint: You know what the correct category totals should be before writing code.
Free project guide / Beginner
Turn a small data file into a repeatable report, with sensible error messages.
2–4 practice sessions ยท suggested effortA script that summarizes category totals and writes a new CSV.
Create a CSV with the headers category,amount and five sample rows. Include repeated categories and one empty amount.
Checkpoint: You know what the correct category totals should be before writing code.
Use Python's csv.DictReader. Validate the headers before processing. Open the file using a context manager and an explicit encoding.
Checkpoint: Print the category and amount for each row without relying on column positions.
Parse amounts with decimal.Decimal. Skip or report invalid rows with their row number; document your chosen policy. Accumulate a total for each category.
Checkpoint: An invalid number produces a readable message, and valid totals match your manual calculation.
Use csv.DictWriter to write category,total rows to a separate output file. Accept the input and output paths with argparse.
Checkpoint: Run the same script on a different file without changing the source.
Add a README, sample input, expected output, and checks for an empty file, missing headers, and invalid values.
Checkpoint: A new user can run your documented example from a clean folder.
Use this checklist to review your project. Sign in to save your checklist and continue from your dashboard.
Document one thing that failed, how you investigated it, and what you would improve next.
Explain your goal, what you tried, and where you got stuck. Check the available mentoring packages for scope and price.