A laptop on a desk where a chaotic, messy spreadsheet on screen transforms into clean, organized charts, showing AI-assisted data cleaning

Every cohort, I run the same classroom demo. I built a teaching dataset for it: 2,400 rows of retail order records that I deliberately corrupted the way real business data gets corrupted. Then I hand the file to Claude in front of the class and ask it to clean the data and write the pandas code. Students watch the whole thing, including the parts where the AI quietly makes things worse. That second part is the actual lesson.

What was wrong with the data

The file is a small museum of everyday data problems:

  • Duplicates. About 180 orders appear twice, some from a system retry, some with slightly different timestamps.
  • Mixed date formats. The order date column contains 03/04/2026, 2026-03-04, and March 4, 2026, sometimes in adjacent rows. Worse, 03/04 means March 4 in some rows and April 3 in others, depending on which regional system exported them.
  • Missing values. Roughly 9 percent of rows have no discount value, and a smaller set is missing customer email.
  • Inconsistent category labels. The state column holds TX, Texas, and texas. The product category column has Home Goods, home goods, and HG, a legacy code from an older system.

Nothing exotic. If you work with business data for a month, you will meet every one of these.

What Claude nailed

The first pass was genuinely impressive, and I tell the class so.

Claude read a sample of the file, wrote a cleaning plan before writing code, and explained each step in plain language. The deduplication logic was sound; it kept the most complete record of each order instead of blindly dropping later rows. The category standardization was thorough, including a mapping table for the legacy HG code that it flagged for my confirmation instead of guessing silently. The date parsing handled the ISO and long-form formats correctly, and the code it produced was clean, commented pandas that my students could actually learn from. Total elapsed time for work that takes a junior analyst most of a day: under ten minutes.

What it got subtly wrong

Then we checked the output together, the way you should always check it, and found two mistakes that no error message would ever reveal.

Mistake one: it filled missing discounts with the average

For the missing discount values, Claude filled in the column mean, about 12 percent. Reasonable sounding, and wrong for this data. In the original file, a missing discount almost always meant the order had no discount at all; the field was simply left blank by the sales team. Filling those rows with 12 percent invented discounts on hundreds of full-price orders and dragged down every margin calculation downstream. The correct fill was zero, and you only know that by understanding how the business records orders.

Mistake two: it guessed the ambiguous dates the American way

For dates like 03/04/2026 from the European export, Claude applied month-first parsing across the whole column. About 60 orders landed in the wrong month. Daily revenue still looked smooth and plausible. Monthly totals shifted just enough to change which month appeared to be the strongest. In a real business review, that is the kind of error that survives all the way into a slide deck.

There was also a smaller catch. It proposed merging two product categories, Office Supplies and Office Equipment, because the names looked similar. In this business they are separate departments with separate margins. Merging them would have hidden a real performance gap.

The review workflow that catches this

None of this means you avoid AI for data cleaning. It means you review like an auditor. This is the checklist I give my students:

  • Read the plan before any code runs. Ask the AI to list its assumptions in writing. The assumptions are where the bodies are buried.
  • Reconcile row counts. Rows in, rows out, rows dropped, with a reason for every drop. If the counts do not tie out, stop.
  • Check the fills. For every missing-value fix, ask one question: what does blank mean in this business? Mean, median, zero, and unknown are four different answers.
  • Spot-check 20 random rows by hand. Compare the cleaned output against the raw file yourself. Twenty rows takes fifteen minutes and catches most silent errors.
  • Keep a cleaning log. Every transformation, written down. When a stakeholder questions a number three weeks later, the log is your defense.

The real skill being taught

Students walk into this demo expecting a lesson about prompting. They walk out understanding that the valuable skill is verification. AI has made the typing part of data cleaning nearly free. What remains expensive, and what employers pay for, is the judgment to know when the output is lying to you politely.

That is why our 12-week Gen AI Data Science Bootcamp teaches data cleaning the slow way first: Python, pandas, and plenty of ugly datasets by hand. Once students can clean data themselves, we hand them AI tools and teach them to review at speed. The bootcamp is live online on Tuesdays 7-9 PM CT and Saturdays 2-4 PM CT, includes an IBM Gen AI certificate, and every student gets career coaching and 1:1 mentoring in a small cohort.