Problems on Data Cleaning and Processing For Machine Learning

5 / 12

Create a categorical column from existing columns

Given the following dataset:

dataset: /cxldata/pet_mle/wine_quality.csv

Categorize the quality values into 3 classes: High, Medium, Low, based on the values of the column quality.


Create a new column WineClass whose value should be

  • High if quality is in range 7-8 :

  • Medium if quality is in range 5-6

  • Low if quality is in range 3-4

The resultant dataframe should be named as wine_cat.

See Answer

No hints are availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...