Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created April 10, 2021 07:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/8e6ab8b8a367188e77ca9810da1f4c4b to your computer and use it in GitHub Desktop.
Save amankharwal/8e6ab8b8a367188e77ca9810da1f4c4b to your computer and use it in GitHub Desktop.
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