Knime Assignment

Hi all. I am trying to get an assignment done which is to be done on knime. I have 100000 rows with many attributes. One of the columns is age column. I have to filter it such that there is no age is less than or equal zero and not greater than 20. I used rule based row filter and used the following code
$Age$ <= 0 AND $Age$ > 120 => TRUE.
But it still shows number such as -500, 6049 and many more.
Also many of the number shave _ and -.
example 28_ and -500
How do i remove those. Help would be really appreciated

Hi @Ammar_74 welcome to KNIME Forum

It looks like your Age column is of format String. To do a proper row filter use the String to Number.
gr. Hans

Hello Hans
It did work. But partially. It shows an error that 28_ could not be transformed into an integer

Hi @Ammar_74

Before the String to Number, use a String Mainpulation node.

replaceChars($age$,“_” ,“” )

gr. Hans

Hi Hans
Thanks so much. it worked out with the manipulation alone. But i cant seem to remove the “-” from the numbers (I tried the string to number as well). Also could you please tell me how I can filter the age such that it is less than equal to 0 and greater than 120. Please don’t mind if i literally do my assignments from here asking questions .
Thanks a lot!
Regards Ammar

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