text_plain_output_1.png image_output_1.png
import itertools

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import os
import seaborn as sns
import itertools
sns.set(style='darkgrid')

data = pd.read_csv('../input/IMDB-Movie-Data.csv')

data.rename({'Runtime (Minutes)': 'Duration', 'Revenue (Millions)': 'Revenue'}, axis='columns', inplace=True)

for col in data.columns:
    nans = pd.value_counts(data[col].isnull())

Nans = data[pd.isnull(data).any(axis=1)]

data.dropna(inplace=True)

actors = list((actor.split(',') for actor in data.Actors))
actors = list(itertools.chain.from_iterable(actors))
actors = [actor.strip(' ') for actor in actors]
actors_count = pd.value_counts(actors)

fig, ax = plt.subplots(figsize=(15, 10))
sns.heatmap(data.corr(), annot=True, fmt='.2f', linewidths=0.5, ax=ax)
plt.show()