Horje
corr pandas Code Example
corr pandas
import seaborn as sns
#load the dataset
df = sns.load_dataset('iris')
#calculate correlation
corr_matrix = df.corr('pearson') #kind of correlation->  ‘pearson’, ‘kendall’, ‘spearman’
#plot correlation
corr_matrix.style.background_gradient(cmap='coolwarm')
# 'RdBu_r', 'BrBG_r', & PuOr_r are other good diverging colormaps




Python

Related
reverse order np array Code Example reverse order np array Code Example
correlation analysis of dataframe python Code Example correlation analysis of dataframe python Code Example
pdf to text python Code Example pdf to text python Code Example
python for k, v in dictionary Code Example python for k, v in dictionary Code Example
twitter bot python Code Example twitter bot python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7