Skip to content

Instantly share code, notes, and snippets.

@AayushSameerShah
Last active June 30, 2022 06:20
Show Gist options
  • Save AayushSameerShah/75011c56970c31947f1b9d90cea806bf to your computer and use it in GitHub Desktop.
Save AayushSameerShah/75011c56970c31947f1b9d90cea806bf to your computer and use it in GitHub Desktop.
This will make a mask for heatmap. (TRIANGLE HEATMAP)
plt.figure(figsize=(10, 6))
corr = df.corr()
mask = np.zeros_like(corr)
mask[np.triu_indices_from(mask)] = True
sns.heatmap(corr, mask=mask, square=True, cmap="Blues")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment