Classwork 4
Convering Data Types; Filtering Data; Dealing with Missing Values/Duplicates
Direction
The netflix-2019.csv
file (with its pathname https://bcdanl.github.io/data/netflix-2019.csv
) contains a list of 6,000 titles that were available to watch in November 2019 on the video streaming service Netflix. It includes four variables: the video’s title
, director
, the date Netflix added it (date_added
), and its type
(category).
Question 1
Optimize the DataFrame for limited memory use and maximum utility by using the astype()
method.
Answer:
Question 2
Find all observations with a title of “Limitless
”.
Answer:
Question 3
Find all observations with a director of “Robert Altman
” and a type of “Movie
”.
Answer:
Question 4
Find all observations with either a date_added of “2018-06-15
” or a director of “Bong Joon Ho
”.
Answer:
Question 5
Find all observations with a director of “Ethan Coen
,”Joel Coen
“, and”Quentin Tarantino
“.
Answer:
Question 6
Find all observations with a date_added
value between January 1, 2019 and February 1, 2019.
Answer:
Question 7
Drop all observations with a NaN
value in the director
variable.
Answer:
Question 8
Identify the days when Netflix added only one movie to its catalog.
Answer: