Question: Question 2 ( 3 0 points ) : Please read the data set below and then answer each questions. you have to use pipelines for
Question points:
Please read the data set below and then answer each questions. you have to use pipelines for this question.
Here is the data set about chocolates.
i Read the data set provided in the above URL and assign the name as chocolate. Print the first rows. Examine the structure of the data and comment shortly.
ii Using the some specific command with pipeoperator, convert all the characters in your data set into factors.
iii. Obtain some statistics such as mean, standard deviation, median and range of rating values with respect to different company locations. Print only the first observations. Comment some specific statistics shortly from the output.
iv Find the chocolates that its review date is equal to and country of bean origin is equal to Colombia.
v Take the mean of chocolate rating and cocoa percent according to the company location.
vi Select company manufacturer, company location and country of bean origin shortly. Print the first rows of the data frame. Hint: Please check the column names
vii. Filter that company location in Switzerland whose rating between and Take the five observations.
viii. What is the mean of the rating column for each company locations find and order by descending.
ix Count that how many observations are assigned Bonnat for each country of bean origin?
v Using mutate function create a new column called Rating Percantage, which is percentage version of the rating column. For instance if the rating is then percentage of it is If the rating is their percentage is After that create another new column called Class, if Rating Percantage is less than then called Class as Low, if its between and called as Medium, if its between and called as Tasty and if its bigger than called as Excellent.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
