Remove non numerical

Hello. I have an attribute Num_of_Delayed_Payment. The task is to replace the non-numerical symbols and convert to integer format. I check that the non numerical values are 3_, _7 etc. I removed them using string manipulation. But there are also negative values such as -1 etc. Do I also remove the minus? Is minus a non numerical symbol? Also I will convert to integer type using string to number.
Thanks a lot!

Hey @Ammar_74,

converting String to Numbers can be achieved the way you already explained with the String to Number Node and most likely you have to clean the Strings first. So you already have the necessary steps at hand to do so. What we do not know is, if in your case the minus is considered a non numerical symbol or not. If this is part of a test/homework/etc. it might make sense to ask the person you got the task from From my point of view it does not make sense to have a negative numbers of delayed payments.

2 Likes

Thanks a lot @laaaarsi . You are right. This for an assignmnent which is due this 14th . I will ask my tutor tomorrow.
Set the â€śCredit_Mixâ€ť value to â€śUnknowâ€ť if the original value is â€ś_â€ť. How can I achieve this?
Set the value to â€śUnknowâ€ť if the original value in â€śPayment_Behaviourâ€ť attribute starts
with â€ś!@â€ť And this?
So sorry for bothering you. Thanks

So if it is for an assignment I think you should tackle the problems yourself because the forum users should not solve your assignment. But regarding your questions just have a look at your first thread (hint: Rule Engine)

1 Like

Hi,

You can use the string manipulation node to change the data from the column.

You can use the replace function or regular expression to replace it too.

An expression for simple cases:

This will replace â€ś-â€ť, â€ś_â€ť, â€ś@â€ť witn 1 or more duplicated chars for empty char â€śâ€ť, means that it will remove it from the string.

Thanks,

Denis

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.