Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Remove leading zero, space and dash in existing column and return the output in new column

syazwaansyazwaan Member Posts: 3 Learner I
I have a dataset something like this:

I want to remove leading zero, space, and dash in column_1 and return the new data in a new column.

Expected output:


Thank you.
Tagged:

Best Answer

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi!

    The easiest way to do this is Generate Attributes with the replaceAll function.

    It takes three parameters: The name of the attribute to read (column_1), the regular expression to search for, and the replacement (the empty string "").
    A regular expression to find leading spaces, zeros and dashes would be this: ^[0 -]+

    Regards,
    Balázs
Sign In or Register to comment.