TRANSPOSE DATA

Dear all, hoping you are doing well, I want to ask the following question. I haven’t been able to find a way to do this exercise in KNIME. I have two columns, ID and Categories, as shown in the example.
image

I need to transform them into the format shown in table2.
image

Has anyone done something similar? Regards.

Hi @Judoka0069

In this case, one can use a -groupby- node, grouping by column ID and using list as the aggregating function. Then, a -collection splitter- node can split the list into different colums:

Finallly, a -colum rename (regex)- node can be used to rename all the columns as in your example.

Hope this helps.

Best
Ael

2 Likes

hi @Judoka0069
this is my simple workflow for the transformation. hopefully, it meets your requirements."

rgds
newbie.

2 Likes

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