Classwork 5

Dealing with Missing Values/Duplicates; Group Operations

Author

Byeong-Hak Choe

Published

March 5, 2024

Modified

March 10, 2024

Direction

Part 1

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

Find all observations with a date_added value between January 1, 2019 and February 1, 2019.

Answer:



Question 2

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

Answer:



Question 3

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

Answer:



Part 2



The dataset ,cereals_oatmeal.csv,(with its pathname https://bcdanl.github.io/data/cereals_oatmeal.csv) is a listing of 76 popular breakfast cereals and oatmeal.

Question 1

Group the cereals_oatmeal, using the Manufacturer variable.

Answer:



Question 2

Determine the total number of groups, and the number of cereals per group.

Answer:



Question 3

Extract the cereals that belong to the manufacturer "Kellogg's".

Answer:



Question 4

Calculate the average of values in the Calories, Fiber, and Sugars variables for each manufacturer.

Answer:



Question 5

Find the maximum value in the Sugars variable for each manufacturer.

Answer:



Question 6

Find the minimum value in the Fiber variable for each manufacturer.

Answer:



Question 7

Extract the cereal with the lowest amount of grams of sugar per manufacturer in a new DataFrame.

Answer:



Discussion

Welcome to our Classwork 5 Discussion Board! 👋

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

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 5 materials or need clarification on any points, don’t hesitate to ask here.

Let’s collaborate and learn from each other!

Back to top