corr = df.corr()
fig, ax = plt.subplots(figsize=(size, size))
ax.matshow(corr)
plt.xticks(list(range(len(corr.columns))), corr.columns)
plt.yticks(list(range(len(corr.columns))), corr.columns)
Correlation matrix using pandas