Skip to content

Instantly share code, notes, and snippets.

@Krishna829
Created October 14, 2019 08:37
Show Gist options
  • Save Krishna829/bec6d14e25f1b98df0ba5ed8d5a8b70f to your computer and use it in GitHub Desktop.
Save Krishna829/bec6d14e25f1b98df0ba5ed8d5a8b70f to your computer and use it in GitHub Desktop.
Correlation
# Set the width and height of the plot
f, ax = plt.subplots(figsize=(10, 10))
# Generate correlation matrix
corr_matrix = data.corr()
# Plot using seaborn library
sns.heatmap(corr_matrix, mask=np.zeros_like(corr_matrix,dtype=np.bool),
square=True, ax=ax, annot=True)
plt.plot()
corr_matrix = data.corr()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment