Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/heatmaps.py Secret

Created Apr 10, 2021
Embed
What would you like to do?
import pandas as pd
movies = pd.read_csv("MoviesOnStreamingPlatforms_updated.csv")
movies['Rotten Tomatoes'] = movies["Rotten Tomatoes"].str.replace("%", "").astype(float)
movies.drop("Type", inplace=True, axis=1)
correlations = movies.corr(method='pearson')
import seaborn as sns
import matplotlib.pyplot as plt
sns.heatmap(correlations, cmap="coolwarm")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment