Horje
correlation python Code Example
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
correlation matrix python
# option 1
corr_matrix = df.corr()
corr_matrix.style.background_gradient(cmap='coolwarm')

# option 2
plt.figure(figsize=(10,10))
cor = df.corr()
sns.heatmap(cor, annot=True, cmap=plt.cm.Blues)
correlation python
import numpy as np
import scipy.stats
x = np.arange(15, 20)
y = np.arange(5, 10)
stat, p = scipy.stats.pearsonr(x, y) 




Python

Related
converting decimal to hex in python Code Example converting decimal to hex in python Code Example
pandas replace values based on condition Code Example pandas replace values based on condition Code Example
python - iterate with the data frame Code Example python - iterate with the data frame Code Example
rightclick in pygame Code Example rightclick in pygame Code Example
install python in centos7 Code Example install python in centos7 Code Example

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