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 and matplotlib
import pandas as pd
import matplotlib.pyplot as plt

# Read in the Netflix CSV as a DataFrame
netflix_df = pd.read_csv("netflix_data.csv")
import numpy as np
import matplotlib.pyplot as plt 
import pandas as pd
netflix = pd.read_csv("netflix_data.csv", index_col = 0)
#we need to filter shows from movies DONE
#we need 90s movies DONE
#highest movie duration frequency 
#we need action movies 90s with duration < 90 
print(netflix.columns)
netflix_mov = netflix[(netflix["type"] == "Movie")]
print(netflix_mov)
#90s movies, rel_year >=1990 and <=1999
mov90s = netflix_mov[np.logical_and(netflix_mov["release_year"] >= 1990 , netflix_mov["release_year"]<=1999)]
print(mov90s)
#we need pandas series duration.
dur=mov90s["duration"]
duration = dur.mode()[0]
print(duration)
#we identified highest duration frequence among the 90s movies now let's visualize it. 
plt.hist(dur, bins = 25, color ="red", edgecolor = "black")
plt.xlim(0,240)
plt.xlabel("Duration")
plt.ylabel("Frequency")
plt.title("90s Netflix Movie Durations")
plt.show()
#now let's find the number of action movies with duration less than 90 
action_mov = mov90s[(mov90s["genre"]=="Action")]
short_action = action_mov[(action_mov["duration"]<90)]
short_movie_count = len(short_action)
print(len(short_action))
print(short_action)