How to keep orignal name of column if rename field is empty
sgnarkhede2016
New Altair Community Member
I want to rename only few attribute names from all attributes
e.g.
I have two column "Name" and "Rename"
Name Rename
Sachin Sachin N
Abhay ?
Jay Jayesh
Ankita ?
I want to keep same name if rename is "?"
How to achive this in rapidminer
e.g.
I have two column "Name" and "Rename"
Name Rename
Sachin Sachin N
Abhay ?
Jay Jayesh
Ankita ?
I want to keep same name if rename is "?"
How to achive this in rapidminer
Tagged:
1
Answers
-
Use the 'Generate attribute' operator for this and use a script like this :
if(missing([Rename]),[Name],[Rename])
So if there is no Rename (your ?) keep the Name, otherwise use Rename2 -
@sgnarkhede2016
Hello
Because you want to change the name of some column in your data and use "?" in that I recommend you to read these links because may be for changing the name to "?" you need to pay attention to some points.
https://community.rapidminer.com/discussion/comment/63890#Comment_63890
https://community.rapidminer.com/discussion/comment/63840#Comment_63840
All the best
mbs1