Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Reorganize the Taste dataframe so that each of the four tastes (Salty, Sour, Sweet and Bitter) become values of a new column called Taste_type. A

Reorganize the Taste dataframe so that each of the four tastes (Salty, Sour, Sweet and Bitter) become values of a new column called Taste_type. A new column, called Taste_order will also be created to indicate if a given taste is a first or second taste for each chocolate.

b. The resulting Taste dataframe has rows with missing values which can be an issue for further data analysis.

Remove any rows that have a missing value.

c. We can now combine the data frames CompetitionChocolate and Taste to obtain a more complete view of the data. Combine the two dataframe using the column Ref from CompetitionChocolate and ChocolateID from Taste.

The resulting data frame should be called Chocolate.

Remove the column ChocolateID from Chocolate.

A correct version of the Chocolate dataframe can be found in the file Chocolate _Q5.csv Feel free to use it for the remaining questions.

Q2

Using the Chocolate dataframe write the code:

List the company name(s) having a chocolate containing salt but without a salty first taste

For each company location, indicate the average number of ingredients used and how many of each taste type (bitter, sour, salty and sweet) are a first taste.

Q 3

Using the Chocolate dataframe, use the data model of your choice and the predictors of your choice to derive a model predicting a chocolate rating.

Rearrange the dataframe if necessary.

 

0 1 2 3 4 74 75 76 77 78 ChocolatelD 2460 Salty 2138 2198 first_taste 2474 first_taste second_taste 2466 second_taste 2477 second_taste 2342 first_taste NaN Sour NaN 2262 2171 second_taste 2112 NaN NaN NaN first_taste second_taste NaN second_taste Sweet first_taste first_taste NaN second_taste NaN second_taste NaN first_taste second_taste NaN Bitter first_taste NaN first_taste NaN second_taste NaN NaN NaN NaN NaN NaN NaN NaN first_taste

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Governmental and Nonprofit Accounting

Authors: Robert Freeman, Craig Shoulders, Gregory Allison, Robert Smi

10th edition

132751267, 978-0132751261

More Books

Students also viewed these Algorithms questions

Question

Briefly describe Aristotles four kinds of causation.

Answered: 1 week ago