Module 5 · Data that arrives dirty

Missing values: NULL, empty, N/A, zero and minus one

In this lesson

  • 9 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 8 of 12 in this chapter

This chapter’s goalLoad an exported CSV with mixed encodings, ambiguous dates and duplicate rows into a typed, deduplicated table by re-runnable query with every dropped row counted, decide and document what each missing value means, and produce a feature table for a model in which no column knows anything that happened after its row’s timestamp.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Two hundred people skipped the income question. Four ways to report itThe 800 who answered47200Gaps filled with zero37760Gaps filled with the mean47200Gaps filled with themedian46160rupees, mean monthly income over 1,000 respondentsEight hundred people answered, with a mean of 47,200 and a median of 42,000. Filling with zero inventstwo hundred destitute respondents and drags the mean down by a fifth. Filling with the mean leaves themean alone and quietly shrinks the spread, because every filled row sits exactly on the centre.
Eight hundred people answered, with a mean of 47,200 and a median of 42,000. Filling with zero invents two hundred destitute respondents and drags the mean down by a fifth. Filling with the mean leaves the mean alone and quietly shrinks the spread, because every filled row sits exactly on the centre.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

Five spellings of “we do not know”

The NULL lesson covered how a database compares an unknown. This one is about what to do when a column full of unknowns arrives, and it starts with the fact that most exports do not use NULL for missing at all. They use the empty string, or N/A, or the literal text NULL, or a dash, or a zero, or -1, or 9999, or 1900-01-01. Every one of these is a value that a query will happily compare, sum and average.

Find them by looking at the tail of the value list, as the earlier cleaning lesson showed, and then at the round numbers: a spike of 0 in an income column, a cluster at -1 in an age column, a date of 1 January 1900 in a column of birthdays. Then convert each to a real NULL in the clean view, and count each kind separately:

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Building Apps with AI exam.

Stuck on something?Ask Divya, your AI tutor

How to cite: Addaly (2026) ‘Missing values: NULL, empty, N/A, zero and minus one’, in Data, SQL and Getting to the Answer. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/data-and-sql/missing-values-honestly (Accessed: 29 November 2026).