String to number

Hi, I need to map a string attribute (with 4 different values) of a dataset to a numer.

Example: String "Good" become number 2,string "NotGood" become number 1 and string "Bad" become number 0

Which is the best method?

Can I use a binner?


if you don't care of the value you can use the Category to Number node (but than good can be 1 and not good 0 and bad 2)

Otherwise you need to do this by hand. I would use the Cell replacer node. It needs a data table with a mapping (string -> int) this you can create with a Table Creator.

Best, Iris

Rule Engine might also be an option to consider.