I’ve got the following table like this:
col1 | col2 |
---|---|
A | A1 |
A | A2 |
A | A3 |
B | B1 |
B | B2 |
B | B3 |
now i want convert it like this:
A | B |
---|---|
A1 | B1 |
A2 | B2 |
A3 | B3 |
Anybody can help me ?
Thanks !
I’ve got the following table like this:
col1 | col2 |
---|---|
A | A1 |
A | A2 |
A | A3 |
B | B1 |
B | B2 |
B | B3 |
now i want convert it like this:
A | B |
---|---|
A1 | B1 |
A2 | B2 |
A3 | B3 |
Anybody can help me ?
Thanks !
Hi there!
This was interesting but maybe I got it! Use Column Expressions node as many times as there is Groups (A,B,…) with expression
if(column("col1")=="A")
column("col2")
and column name of your group. You will get column with missing values for all groups except A group. After that you can filter column you don’t need (all except A column). After that use Row filter node to filter out missing values. Repeat this for all groups and use use Column Appender node
It could be optimized I guess
Instead of Column Expressions node you can use Rule Engine node as well.
Br,
Ivan
Hi Ivan,
Thanks for your reply! I’m new to knime and i try to understand your solution,but still don’t know how to do it.
could you offer me a demo workflow file?
Thank you very much again!
Hi Ivan,
I got it ,thank you very much again!
You are welcomed
Ivan