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

imdb_movies = pd.read_csv('../input/imdb-movies.csv')
movie_count = imdb_movies.shape[0]
columns_to_keep = ['popularity', 'budget', 'revenue', 'original_title', 'director', 'runtime', 'genres', 'production_companies', 'release_year']
imdb_movies = imdb_movies[columns_to_keep]
animated_movies = imdb_movies[imdb_movies['genres'].str.contains('Animation') == True]
animated_movies_count = animated_movies.shape[0]
animated_movies = animated_movies.assign(profit=pd.Series(animated_movies.revenue - animated_movies.budget).values)

animated_movies['production_companies'].value_counts().head(5).plot.bar(figsize=(10, 5))