Skip to content

Instantly share code, notes, and snippets.

Created May 18, 2021
What would you like to do?
# Heatmaps
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
movies = pd.read_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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment