Replacing individual values inside a column based on conditions
msokolov
New Altair Community Member
Hey everyone,
I've just started testing RapidMiner and I'm having a bit of trouble doing this one task.
Basically I need to replace existing values with custom values in one column based on a condition.
So basically, I need to change TOTAL_SALDO numbers based on the value of the Month column. I'm having trouble finding a way to do that in RapidMiner.
I guess one could write the desired expression the following way:
IF Month == 3 THEN TOTAL_SALDO = -682.51 ELSE IF Month == 6 THEN TOTAL_SALDO = -6602.66 ELSE IF Month == 9 THEN TOTAL_SALDO = -29141.54 ELSE TOTAL_SALDO = 110778.17
Thank you for your attention!
Tagged:
0
Answers
-
Hi @msokolov,
You can use the generate attribute operator. You can build this if statement.
Please refer to this video from our academy.
Feature Generation demo | RapidMiner Studio0