We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Inspecting Workflow

When you're inspecting a new dataset, here's what "good data" looks like:

  1. Reasonable null counts – A few missing values are normal, but if 50% of a column is null, that's usually a problem.
  2. Expected data types – Numbers should use an appropriate numeric type, not object (i.e., text).
  3. Realistic min/max values – Negative ages? Dates in the year 2200? Investigate.
  4. Consistent column names – If you see user_id and userId, something's off.
  5. Expected row counts – Does the number of rows match what you were told about the data?

Real-world data is often messy, so you need to know what you're dealing with. If you see any of the issues mentioned above, it's a sign that you need to do some data cleaning before you can conduct any meaningful analysis.

When I start working with a dataset, after loading it into a DataFrame, the first thing I do is run .head(), .info(), and .describe() in that order. For example:

  1. I get a new dataset for last month's sales.
  2. I run .head() – "Okay, the columns make sense."
  3. I run .info() – "Hmm, 500 null values in the email column seems weird."
  4. I run .describe() – "Wait, the mean price is negative? Must be a bug..."