Expected different values in heat map - FCC - medical data visualizer project

I have read forums regarding the same issue and have tried using the solutions provided but nothing has worked so far.
The difference I am getting in values is extremely small though.
Correlation between weight and height is expected to be 0.3 but I am getting it as 0.2 and between weight and overweight it is expected as 0.7 but I am getting it as 0.6.

Link to code on replit: boilerplate-medical-data-visualizer - Nix (beta) Repl - Replit

Would be glad if anyone could help me out!

You’ve got a typo in your copy/paste here:

    df_heat = df[(df['ap_lo'] <= df['ap_hi']) 
                    & (df['height'] >= df['height'].quantile(0.025)) 
                    & (df['height'] <= df['height'].quantile(0.975)) 
                    & (df['weight'] >= df['weight'].quantile(0.025)) 
                    & (df['height'] <= df['height'].quantile(0.975))]

You have too many heights.

1 Like

How can I not see that? :sweat_smile:
Thanks a lot @jeremy.a.gray

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.