Hi everyone,
I’m currently doing the Data Analysis course and I have a problem with the Medical Data Visualizer, when I have to draw the cat plot.
I should be getting something like this:
I dropped your posted code in my working version and the correct graph was generated (your code was substantially the same as mine anyway). So, the problem is likely elsewhere. Post a link to your project on repl.it or similar and may the issue can be found.
I was working with PyCharm, because I like to run the code from time to time to see if it works, and when I uploaded the code the “normalize” part didn’t work on repl (don’t know why). But I changed that part and it seems like it still doesn’t work… Maybe the problem is there?
If you add a print(df) before and after the first line, you’ll see that this code is setting your data to zeroes as it matches. By the end, the entire dataframe is all zeroes.
As usual with pandas, there are numerous ways to make these kinds of changes.