Lesson 1 of 0
In Progress

Challenge 7: Wine Analysis

Kedeisha May 22, 2023

Those who submit an entry will be eligible to win a free copy of any book related to data analysis by Packt! The more weeks you participate, the more chances you get to win!

There is no deadline for submission.

Scenario

You are a data analyst at one of the world’s largest wine companies and you have been tasked with summarizing data about wine. Your manager would like the following questions answered.

Read in the Data

url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data' 

wine = pd.read_csv(url) 

Questions

  1. Delete the first, fourth, seventh, nineth, eleventh, thirteenth and fourteenth columns.
  2. Assign the columns as below:
    • alcohol
    • malic_acid
    • alcalinity_of_ash
    • magnesium
    • flavanoids
    • proanthocyanins
    • hue
  3. Set the values of the first 3 rows in the alcohol column as NaN
  4. Now set the value of the rows 3 and 4 of the magnesium column as NaN
  5. Fill in the null values (NaN) with the number 10 in the alcohol column and 100 in magnesium column.
  6. Count the number of missing values in the entire dataset.

Submission Instructions

Place a comment below the post with your submission, then make a LinkedIn or twitter post with a screenshot or PDF of your answers. You can explain your thought process if you’d like. Just make sure to tag the Data in Motion LLC LinkedIn page or Twitter page.