Data Transformation and ModelingCounting rows, values and distinct values: how nulls change the answer
In one line: count(*) counts rows, count(col) and countDistinct skip nulls, and distinct().count() treats null as one value, so the totals differ.
You’ve read your 2 free Databricks DEA lessons
Sign up free to read every lesson — your progress is saved.
Spotted a mistake in this part?