Row to column

Hi,
I was wondering how can i do this in knime:
Input:

Code Prediction Quantity
a b d
a c e

Output:

Code Prediction Prediction2 Quantity Quantity2
a b c d e

Thanks

Hi,

transformations like this can be done with the Unpivoting node.
Attached is a little example workflow.

Cheers,
Kathrin
Unpivoting.knwf (13.1 KB)

2 Likes

There isn’t any other way to do that? Because I have too many rows and I should the raw filter multiple times

Depending on you table, you can maybe use the GroupBy node instead on the Row Filter node to delete duplicate values.

You could use a GroupBy node, grouping on “code”, collecting prediction and quantity into Lists, and then use a Split Collection Column for each of the prediction and quantity list columns

Steve

1 Like

Hi there!

Or instead of Lists you can use Concatenate in GroupBy node followed by Cell Splitter for both prediction and company column.

KNIME offers many options :wink:

Br,
Ivan