Medical Data Visualizer: heatmap error

Hi all,

I am receiving the following error for the heatmap problem. The thing that I don’t understand is that my heatmap looks almost identical to the example with the same values in each square. I am not sure why the test is saying that the element 0 is 1.0 when the first value in the heatmap that is displayed is 0.0. Am I not understanding the error?

FAIL: test_heat_map_values (test_module.HeatMapTestCase)

Traceback (most recent call last):
File “/home/runner/fcc-medical-data-visualizer/”, line 47, in test_heat_map_values
self.assertEqual(actual, expected, “Expected differnt values in heat map.”)
AssertionError: Lists differ: [‘1.0’, ‘1.0’, ‘1.0’, ‘1.0’, ‘1.0’, ‘1.0’, [601 chars], ‘’] != [‘0.0’, ‘0.0’, ‘-0.0’, ‘0.0’, ‘-0.1’, ‘0.5’[627 chars], ‘’]

First differing element 0:

Diff is 2316 characters long. Set self.maxDiff to None to see it. : Expected differnt values in heat map.

I have already updated the version of matplotlib by changing the version in the poetry.lock file to:
category = “main”
description = “Python plotting package”
name = “matplotlib”
optional = false
python-versions = “>=3.6”
version = “3.1.3”

I also updated the pyproject.toml file dependency for matplotlib so that repl would accept the change in the poetry.lock file:

python = “^3.8”
numpy = “^1.19.2”
pandas = “^1.1.2”
seaborn = “^0.11.0”
matplotlib = “^3.1.3”

Below is my heatmap.

I found the problem. I had done my filters for cholesterol and gluc incorrectly such that the values were a little off. I used the df.loc[filter, column_heading] to filter and that fixed the problem.