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
Replacing Miscoded Values/terms
Hi! My data set should only include these entries: Positive and Negative. However, there are miscoded entries such as Neg, NEG, and Pos. I tried the "Replace" operator for a couple of times now but some correct entries change too. For instance, I want to change Neg to Negative, the entries with the correct word Negative become Negativeative. How can I correct this?
0
Best Answer
-
BalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 UnicornHi!
^neg.* would be a good expression, especially if you switch on case-insensitive matching.
^ means "beginning of the string". This makes sure that your text starts with "neg". The .* after it is "any sequence of characters". This will match neg, negative, negativeative etc.
Replace is good for replacing text that you can express as a regular expression. If you have a list of values, Map can be easier to use without regular expressions.
Regards,
Balázs1
Answers