Skip to content

Netflix! What started in 1997 as a DVD rental service has since exploded into one of the largest entertainment and media companies.

Given the large number of movies and series available on the platform, it is a perfect opportunity to flex your exploratory data analysis skills and dive into the entertainment industry.

You work for a production company that specializes in nostalgic styles. You want to do some research on movies released in the 1990's. You'll delve into Netflix data and perform exploratory data analysis to better understand this awesome movie decade!

You have been supplied with the dataset netflix_data.csv, along with the following table detailing the column names and descriptions. Feel free to experiment further after submitting!

The data

netflix_data.csv

ColumnDescription
show_idThe ID of the show
typeType of show
titleTitle of the show
directorDirector of the show
castCast of the show
countryCountry of origin
date_addedDate added to Netflix
release_yearYear of Netflix release
durationDuration of the show in minutes
descriptionDescription of the show
genreShow genre
# Importing pandas, numpy, and matplotlib
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

# Read in the Netflix CSV as a DataFrame
netflix_df = pd.read_csv("netflix_data.csv")
# Start coding here! Use as many cells as you like
netflix_df.head()

Exploratory data analysis (EDA) involves examining a data set and summarizing its main characteristics, often visualizing them to understand patterns, detect anomalies, and generate insights. This EDA focuses on a filtered Netflix dataset that includes only shows from the 1990s. Below are the different types of analyses considered and questions answered.

Find the list of movies from the 1990s

# Filter data set to only include movies from the 1990s
netflix_90s = netflix_df[(netflix_df['release_year'] >= 1990) & (netflix_df['release_year'] < 2000)]
netflix_90s.head(10)

Display a subset of the 1990s movies columns

netflix_90s = netflix_90s[['title', 'duration', 'genre', 'release_year']]
netflix_90s.head(10)

Questions to answer

  • Count the number of short action movies released in the 1990s
  • What was the most frequent movie duration in the 1990s?

Short Movies

A movie is considered short if it is less than 90 minutes. Count the number of short action movies released in the 1990s and save this integer as short_movie_count

You can find the movies that meet the criteria by filtering the Netflix 1990s dataframe for movies less than 90 minutes and in the action genre. The dataframe shown below illustrates the movies meeting the requirements.

netflix_90s_short = netflix_90s[(netflix_90s['duration'] < 90) & (netflix_90s['genre'] == 'Action')]
netflix_90s_short[['title', 'genre', 'duration', 'release_year']].set_index('title')
short_movie_count = netflix_90s_short['title'].value_counts().sum()
print('Number of Action Movies less than 90 minutes in length: {}'.format(short_movie_count))