correlation heatmap seaborn code example
Example 1: seaborn create a correlation matrix
import seaborn as sns
%matplotlib inline
# calculate the correlation matrix
corr = auto_df.corr()
# plot the heatmap
sns.heatmap(corr,
xticklabels=corr.columns,
yticklabels=corr.columns)
Example 2: seaborn correlation heatmap
import pandas as pd
import seaborn as sns
sns.heatmap(dataframe.corr(), annot=True) # annot is optional
Example 3: show integer seabron heatmap values
sns.heatmap(table2,annot=True,cmap='Blues', fmt='g')