The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Replace values by conditional match
Hi all,
I searched the community and couldn't find the answer. Maybe it was solved before but I need it urgently. So appreciate if you answer again.

I am working on a very messy dataset. As you look above, models L200, L 200, MITSUBISHI L200 etc. (I mean all of them) are the same model of a brand. I would like to replace any value that has "200" with "L200".
ex value - --------------------- -new value
MITSUBISHI L 200 -L200
L 200 -L200
L200 4x4 -L200
so on.
is there any easy way of doing it?
I searched the community and couldn't find the answer. Maybe it was solved before but I need it urgently. So appreciate if you answer again.

I am working on a very messy dataset. As you look above, models L200, L 200, MITSUBISHI L200 etc. (I mean all of them) are the same model of a brand. I would like to replace any value that has "200" with "L200".
ex value - --------------------- -new value
MITSUBISHI L 200 -L200
L 200 -L200
L200 4x4 -L200
so on.
is there any easy way of doing it?
0
Best Answer
-
hbajpai Member Posts: 102
Unicorn
Hey @dedeer ,
You can use Generate attributes to create a cleaned attribute as following. If it just few cases that you want to clean.if(contains(model,"200"),"L200",model)
Also, you can explore regex with Replace operator for a more generalized solution.
Best,
Harshit7