Skip to main content

Guided project

A script that cleans a messy CSV

Write a Python script that reads a messy CSV file, fixes common problems such as blank rows, stray spaces, mixed date formats and duplicates, writes a clean file and prints a short report of what it changed.

Starterabout 6 hours6 steps

On Generative AI & LLM Engineer: Python starter

You will need

  • Python 3 installed and a code editor
  • A messy CSV, such as a sample sales or attendance export with at least 100 rows

Lessons it uses

What you will show

  • A GitHub repository with the script and a sample messy file
  • A README with how to run it
  • The printed report from one run

Sign up free to see every step

The 6 steps, the rubric to check yourself against, and ideas to go further. It is free, takes a few seconds and needs no card.

Accounts are for learners aged 18 and over. Under 18? The quick answer and the first part of every lesson stay open: browse lessons by topic.

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.