How to create a categorical column from numerical column

deepakdhiman
deepakdhiman Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 10 ✭✭✭✭

I have a numerical column "median_income" with values ranging from 0.49(min) to 15.0(max) with more than 20000 records.

I want to create a categorical columns with 6 categories for different ranges i.e.

- for median_income < 1.5, label 1,

- for 1.5 < median_income < 3.0, label 2

and so on.

what are different ways in Dataiku by which I can accomplish this?

Thanks

Best Answer

  • FlorentD
    FlorentD Dataiker, Dataiku DSS Core Designer, Registered Posts: 25 Dataiker
    Answer ✓

    Just use prepare recipe with the formula :

    if(median_income < 1.5, "label 1",

    if(median_income < 3.0, "label 2", "label3"

    ))

Answers

Setup Info
    Tags
      Help me…