Output groupby CSV files that share some data

Hi everyone!

I am trying to create a workflow where I can parse/groupby data based on a specific column for eg.,Project A, B, C, D, Control and write different CSV files of data that belong to the same Project. However I would like that each final CSV file also had data from the Project Control, meaning Control data should be present in every independent CSV file together with the data specific to Project A + Control or Project B+ Control…and so on.

I think in Python I would create different lists and append the specific data that I want but in Knime I am not sure how to do it.
Can anyone help??

Thanks so much!

By information from project control you mean you would like to append columns with information or rows.

You could use a loop to create the CSV files and before writing to disk append columns with constant values or append lines you want.

Modify an approach like this

Thanks for helping!!

I would like to append rows. For example I have this column:
Project
A
B
A
C
Control

I would like to separate this column into different files:
File 1
A
A
Control

File 2
B
Control

File 3
C
Control

Using groupby allows me to get files with data from A, B, C and Control but I want to be able to have data from A+Control, B+Control…etc…
Any help is much appreciated!!

How about to then concatenate the control information at the end

1 Like

Hello @salomebot,

before GroupBy node or in case you are using loop (Group Loop Start) filter out Control data and concatenate it to each group before writing data out of KNIME.

Br,
Ivan

1 Like

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