Missing values output not same

Screen Link: https://app.dataquest.io/m/347/working-with-missing-and-duplicate-data/3/correcting-data-cleaning-errors-that-result-in-missing-values

My Code:

The following code is from the main content not from the exercise.

combined = pd.concat([happiness2015, happiness2016, happiness2017], ignore_index=True)

The expected output looks like this:


However, my output looks like this:

The same problem persists with the next lesson:

The code to generate heatmap looks like this:

import seaborn as sns
combined_updated = combined.set_index('YEAR')
sns.heatmap(combined_updated.isnull(), cbar=False)

Expected Output:


My output:

1 Like

Can anyone please reply?

1 Like

When you submit the answer, do you have only the missing output wrong or the combined as well?

1 Like

Hi @prateek

Can you try a few more data cleaning steps?

  • remove the ()
  • make all of the column names in UPPER case

and see if makes any difference

Regarding the Heat map, if you look closely the areas and patterns in both images are the same. It is just the colour difference and overpopulated year values on the y axis. Even for me, the heat map is appearing the same way you have on your output.

1 Like

I’m at this point in the course.

When I execute combined.isnull().sum(), I expected the output to be same as in the image above. But this is not happening.

I not talking about the exercise at the end of the page.

How can I make my out looks like the one indicated.

If you want that exact output, just go to the previous screen and try this code

pd.concat([happiness2015, happiness2016, happiness2017], ignore_index=True).isnull().sum()

You will get the output you have marked.

1 Like

and how can I get the same heatmap as indiacted?
Do I have to pass any extra arguments?

1 Like

Yes, you can change the colours with extra arguments. Please have a look at this documentation.


The issue is not about colors, its about the Y-axis, years in the Y-axis are completely unreadable.

Please take a look:

I’ve tried generating the heatmap in different browsers, but the issue remains the same.

1 Like