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

Missing Values

Real-world data is never rarely perfect, and you'll often find missing or blank values. As a data analyst, it may fall to you to fill in the missing spots with something more meaningful.

Some entries are missing from the website_sessions data! Null values are strewn about the session_quality_score column. Let's replace those null values with 0.5. Quality scores are from 0–1, so this will just assume the few missing values are "average." How you should replace or handle missing data is very situation-dependent. Here we have less than 1% of the data missing, so this seems like an acceptable strategy.

Blanks in your data are like potholes – harmless at first, but they can trip you up later if you ignore them.

Assignment

    • On non-US English systems, you may need to enter 0,5 instead of 0.5 if your locale uses a comma as the decimal separator.

    For text data it often makes sense to use a placeholder string like: Unknown, Missing, or N/A; just be consistent. It's trickier with numbers. Sometimes you can use a representative value, like an average or median, sometimes you can leave it null, and sometimes it's best to just remove erroneous nulls.

Save the project and, from the course directory, submit the CLI tests.