Answers for "correlation matrix visual python"

3

visualize correlation matrix python

import seaborn as sns
df = sns.load_dataset('iris')
corr_matrix = df.corr()
corr_matrix.style.background_gradient(cmap='coolwarm')
# 'RdBu_r', 'BrBG_r', & PuOr_r are other good diverging colormaps
Posted by: Guest on August-31-2021

Code answers related to "correlation matrix visual python"

Python Answers by Framework

Browse Popular Code Answers by Language