I have a table with 20 columns. I wonder if there is an easy way I could filter in columns two-by-two (not manually selecting all the time) via any loop node? For example, I need to loop first 2 columns (column 1&2) and do some manipulations with them, then loop next 2 columns (column 3&4), etc.
Or would transposing then chunk looping be the only way?
Hi,
Maybe you can use Extract Column Header and a chunk loop to achieve what you want? You will still have all columns in your loop, but the current columns can be made available as flow variables.
Kind regards,
Alexander
You have to select two columns an then filter that two columns. For the first task @AlexanderFillbrunn gives you the solution for the second part, how to filter columns you can see some solutions here: Select first n columns of a table
I think you need a Transpose node and a Chunck Loop. At least I needed both to create a solution. See this workflow looping_a_certain_number_ of_columns.knwf (29.7 KB) . You can adjust the number of columns you want to some calculation on by modifying the Chunk Loop setting and adding another row to the Table Creater node.
I needed to filter in every 2 columns (as a pair) in a non-repetitive way (i.e. if I selected first two columns, then they are not selected in next iterations) and multiply them and get a value.