how to replace operator

sgnarkhede2016
sgnarkhede2016 New Altair Community Member
edited November 2024 in Community Q&A
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
Tagged:

Answers

  • kayman
    kayman New Altair Community Member
    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. 
  • BalazsBaranyRM
    BalazsBaranyRM New Altair Community Member
    However, the canonical operator for this type of replacements is "Map".