text_plain_output_2.png text_plain_output_1.png image_output_1.png
from subprocess import check_output

import matplotlib.pyplot as plt

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

import numpy as np
import pandas as pd
import seaborn as sns
sns.set(style='white')
import matplotlib.pyplot as plt
from subprocess import check_output
df = pd.read_csv('../input/movie_metadata.csv')

df1 = df.dropna()

df2 = df1.select_dtypes(include=['int64', 'float64'])

profit = (df2['gross'].values - df2['budget'].values) / df2['gross'].values * 100
df2.loc[:, 'profit'] = pd.Series(profit, index=df2.index)

corr = df2.corr()
print (corr)

f, ax = plt.subplots(figsize=(11, 9))
cmap = sns.diverging_palette(220, 10, as_cmap=True)
sns.heatmap(corr, cmap=cmap, vmax=1,
            square=True,
            linewidths=.5, cbar_kws={"shrink": .5}, ax=ax)

g = sns.jointplot(x="title_year", y="profit",kind='scatter',size=10,ylim = [0,110],xlim=[1980,2020],data=df2)

h = sns.jointplot(x="imdb_score", y="profit",kind='reg',size=10,ylim = [0,110],data=df2)

h = sns.jointplot(x="num_critic_for_reviews", y="profit",kind='reg',size=10,ylim = [0,110],data=df2)

g = sns.pairplot(df1, hue='content_rating')