1import seaborn as sns
2#load the dataset
3df = sns.load_dataset('iris')
4#calculate correlation
5corr_matrix = df.corr('pearson') #kind of correlation-> ‘pearson’, ‘kendall’, ‘spearman’
6#plot correlation
7corr_matrix.style.background_gradient(cmap='coolwarm')
8# 'RdBu_r', 'BrBG_r', & PuOr_r are other good diverging colormaps
9