Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

how to replace operator

sgnarkhede2016sgnarkhede2016 Member Posts: 152 Contributor II
Hello,
I have column "Gender" column  with values "Male" and "female" 
I want to replace Male with "M"  and female with "F"

how can i do this

Answers

  • kaymankayman Member Posts: 662 Unicorn
    edited December 2020
    Many options. The easiest is to use the replace operator twice, first to replace female with F and then Male with M.

    Another would be to use the generate attribute operator, and use some combined functions.

    You generate the attribute Gender (you actually recreate it) and use prefix(upper([Gender]), 1) for instance. 
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    However, the canonical operator for this type of replacements is "Map".
Sign In or Register to comment.