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这增加了“大众”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 Parameterreplace whatthe 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