new column creation

good morning to all
I need to create an automatism that allows me to create a new column where the values present in a certain column are taken.
the original file is a csv, but for importing it is not a problem
I am attaching an example, maybe from the example it is easier to understand.
I don’t know if it is feasible with Knimethis processing would allow me to complete a project already started with Knime

thanks in advance

(Knime is giving me great satisfaction, congratulations to all of you)

1 Like

Hi Iriva,

So this is how you start, correct?
image

First thing you’ll want to do is to get the 1 and the x in front of BBB, CCC and DDD, 2 and y in front of WWW, and so on, so that you’ll have the item and code to group on. You can achieve this with the Missing Value node. Pick the “Previous Value” method.

image

The result should look like this:
image

And then you use the GroupBy node. Pick item, code and date as the group columns and on the tab “Manual Aggregation” you move desc to the right and choose the Concatenate aggregation method. This is what you should get:
image

If you don’t want the commas, change the “Value delimiter” in the GroupBy node from ", " to " ".

8 Likes

thanks G47_2 !
I didn’t think about the GroupBy node.
If I don’t want any delimiters when I concatenate the data, is it possible to join them?

Thanks!

Hi @Iriva,

Change the “Value delimiter” in the GroupBy node from ", " to nothing and you will join them.

thanks.
I had entered the settings correctly.
I actually realized that in the original file the characters BBB;CCC,DDD have two blank spaces in front of them.
I think this problem (removing the blanks) is not solvable.

Thanks

String Manipulation → strip() can remove leading/trailing white spaces.

1 Like