'How to plot seaborn heatmap for target vs independent features

I have df3 dataframe, my target column is "Per_of_WgtL" and I have other 12 independent columns. Here I want to see the correlation between target & independent columns in descending order and plot the heatmap for it

corr_matrix = df3.corr()
print(corr_matrix["Percent_of_WgtL"].sort_values(ascending=False))

Output:

Percent_of_WgtL    1.000000
BsND_Bloat         0.190860
BsGluc             0.144318
BsND_Full          0.139811
rs6923761          0.091101
BsND_Agg           0.052269
PrePYYt15          0.043543
Bs_Total_PctFat   -0.003681
MeanPrePYY        -0.012922
Sex               -0.029330
PrePYYt45         -0.040316
rs7903146         -0.043709
BsND_Nausea       -0.044458
PrePYYt90         -0.056125
BsND_Pain         -0.071712
Age               -0.073869
Bs_Trunk_PctFat   -0.100634
BsHgt_M           -0.133866
PrePYYbs          -0.194847
BsWgt_Kg          -0.201106
wk16Wgt_Kg        -0.386535
BsBuff_Kcal       -0.389229

Can anyone help with the heatmap plot which shows above result in visulization



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source