excluding columns with 'NaN'

Hi, I am quite new at working with KNIME and unfortunately the first problem appeared. My input table contains 507 columns, some of which contains ‘NaN’. I want to exclude all columns that have at least one ‘NaN’… I only found nodes working for rows and not columns. How can I exclude this columns without transposing the table?

Thank you,
Vanessa

Hi Vanessa (@vani_26) & welcome to the KNIME forum,

There is a node to filter out columns with missing values which can be used for this task:

with plenty of workflow examples here too:

Please find below a workflow example of how to achieve it using the -Missing Value Column Filter- node:

Hope it helps.

Best
Ael

3 Likes

Hi Ael,

thank you very much for your reply. Everything worked well, but how do I keep the values of my input table cause they will convert to 1?

Best, Vanessa

I just solve this problem on my own!!! :slight_smile:

Hi @vani_26

Glad the solution I uploaded to the hub worked for you.

With respect to your question, if I understood well, you would prefer not to have any of the column values modified. In this case, please use the following simple modification which should work as well without eventually modifying any cell value of the original table:

Hope it helps too.

Best
Ael

1 Like

Hi,

exactly I need the unmodified column values. I did a change in the math formula node:

if(isNaN(COL_SUM($$CURRENT_COLUMN$$)), 0/0, $$CURRENT_COLUMN$$)

Cheers, Vanessa

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