text_html_output_1.png
import itertools

import pandas as pd

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)
print('There are ', len(actors), 'different actors in the dataset,after removing NaN rows')