List of the variables in a table

Hi,
I am working with a complex dataset. Just to make my question simplified imagine a table of content like this below:
image
this is my question
How can I get a list of the content of this table like A,B,C,G,… and give a code 1/0 for each row

I’d appreciate any tips.

If possible upload the excel demo file instead of an image. Makes it easier for people to help
br

Sure,
Here is the original table:

Y YI YII YIII
X A B
XI C B
XII B C
XII A C B

And I would like to convert it to this table:

A B C
X 1 1
XI 1
XII 1 1
XII 1 1 1

Hi @AsaM

Please take a look at this example workflow that I have shared previously on the hub:

Using the nodes up to the -RowID- node and changing the configurations to match your data should work:

image

I’ll share a workflow with your data when ready.

Edit: Here is the workflow for your example data:

Thanks
Heather

4 Likes

Thank you so much Heather for the workflow, it has worked perfectly.
|

2 Likes

Hi @AsaM ,

If you just need to convert letters into numbers/bolean, just use the string manipulation multi columns and use it to change it.

image

Example:

I’ll replace the string value for number 1.

If I have missing values, i’ll say that it is empty one (string).

Result:

image

KNIME_project_listvariables.knwf (6.9 KB)

Thats it!

BR,

Denis

1 Like

No problem @AsaM :slight_smile: If you are happy with my solution, I’d really appreciate it if you’d be able to :white_check_mark: the solution box for my reply that contains the shared the workflows :slight_smile:
Thanks
Heather

Already done, thanks

1 Like

Thanks a lot @AsaM :slight_smile:

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