Classwork 14

Pandas Fundamental IV-2: Missing Values; Duplicate Values

Author

Byeong-Hak Choe

Published

April 15, 2026

Modified

April 17, 2026

Direction

The netflix.csv file (with its pathname https://bcdanl.github.io/data/netflix.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).

import pandas as pd 
import numpy as np

# Below is for an interactive display of DataFrame in Colab
from google.colab import data_table
data_table.enable_dataframe_formatter()

netflix = pd.read_csv(
    "https://bcdanl.github.io/data/netflix.csv"
)




Question 1

Identify all observations with a missing value in the director variable.

Answer:



Question 2

Identify all observations with a non-missing value in the date_added variable.

Answer:



Question 3

Count the number of missing values in the director variable.

Answer:



Question 4

Count the values in date_added, including missing values.

Answer:



Question 5

Drop all observations with a NaN value in the director variable.

Answer:



Question 6

Drop all observations with any missing value in the DataFrame.

Answer:



Question 7

Find the duplicated values in the title variable.

Answer:



Question 8

Keep only the first occurrence of each unique title.

Answer:



Question 9

Keep only the last occurrence of each unique title.

Answer:



Question 10

Remove all duplicated title values entirely, so that only titles appearing exactly once remain.

Answer:



Question 11

Identify the days when Netflix added only one title to its catalog.

Answer:



Discussion

Welcome to our Classwork 14 Discussion Board! 👋

This space is designed for you to engage with your classmates about the material covered in Classwork 14.

Whether you are looking to delve deeper into the content, share insights, or have questions about the content, this is the perfect place for you.

If you have any specific questions for Byeong-Hak (@bcdanl) regarding the Classwork 14 materials or need clarification on any points, don’t hesitate to ask here.

All comments will be stored here.

Let’s collaborate and learn from each other!

Back to top