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
How to insert text in multiple attributes (in the beginning)?
Hi all,
i try to add text to all my values in one attrtibute, for example my values of attributes are:
Up
Polo
Beetle
Tiguan
Touran
Caddy
Golf
Passat
an they should add "VW" in the beginning:
VW Up
VW Polo
VW Beetle
VW Tiguan
VW Touran
VW Caddy
VW Golf
VW Passat
Do you have a solution for my problem?
Tagged:
0
Answers
I would use the Replace operator for that. You'd have to do a RegEx to select the word and then append it with VW.
of the top of my head something like this (.*) to select it and replace it with VW $1
Hi @ebayundso,
I don't know if it is the optimal solution, but it works :
Regards,
Lionel
Thomas_Ott: this adds a "VW" in the beginning but also in the end...
Using "Generate Attributes" you can also create another attribute with the value VW (or other car manufacturers as needed) and then create a third attribute which concatenates the manufacturer and the model.
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
Hi @ebayundso,
In the Parameter replace what the RegEx characters ^ and $ have an additional meaning.
If you use ^ as first character it means "Beginning". $ means "End"
The RegEx would then be:
Replace: ^(.*)$
by: VW $1
Happy Mining,
Edin