xxxxxxxxxx
# 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)
xxxxxxxxxx
import numpy as np
import scipy.stats
x = np.arange(15, 20)
y = np.arange(5, 10)
stat, p = scipy.stats.pearsonr(x, y)