currelation matrix python 1

currelation matrix python

plt.figure(figsize=(10,10))
cor = df.corr()
sns.heatmap(cor, annot=True, cmap=plt.cm.Blues)

Here is what the above code is Doing:
1. We’re creating a figure with a size of 10×10 inches.
2. We’re creating a correlation matrix of the dataframe.
3. We’re creating a heatmap of the correlation matrix.

Similar Posts