Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created May 18, 2021
Embed
What would you like to do?
# Heatmaps
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
movies = pd.read_csv("https://raw.githubusercontent.com/amankharwal/Website-data/master/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')
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