Separate a column to multiple ones

Hello
I want to separate a column to have 3 other columns as shown in the table below:
Depending on the type, I would like to separate values in the “Col to separate”

Types Col to separate First Second Third
Type 1 1 1 2
Type 1 2
Type 2 3 3 2 1
Type 2 2
Type 2 1
Type 3 4 4

How can I do that using knime?

Hi there,

is what you posted above your desired output? If yes is it for reporting or for further analysis cause I don’t see why do you want this format and this empty rows… Do you always have 3 possible values or it can be more? Why do you start populating from last column? Do you have only integers in column you want to separate? Can you have missing values there or not?

I know it is a lot of questions but somehow you request is not clear to me…

Br,
Ivan

Hello,
Here’s my input

Types Col to separate
Type 1 1
Type 1 2
Type 2 3
Type 2 2
Type 2 1
Type 3 4

and here’s my desired output

Types First Second Third
Type 1 1 2
Type 2 3 2 1
Type 3 4

Empty cells are missing values and all this values are decimal.
I always have 3 possible values

Hi there,

separate.knwf (17.2 KB)

I aggregated the rows as lists based on the type column and then splitted the collection column and rearranged the values.

Let me know if this is what you were looking for and feel free to ask more questions.

:blush:

2 Likes

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