I want to extract first and last rows from paired sets of columns (column A - time, column B - signal), appended to each other (AB, CD, EF etc each pair has different number rows). I first transpose my data and then use Chunk Loop Start to take each time two rows, after housekeeping (removing NAs and missing values) and taking first and last rows of each paired set of columns, I want to append the results row-wise using Loop End. Despite all previous steps running through, Loop End always crashes. What I am doing wrong?
I think @izaychik63 has a good point with GroupBy node. Forget the loop. This workflow may help you out. The Regex may need some adjustments (not my cup of tea ) Find_first_and_last_rows_values.knwf (293.0 KB)
I would do something like:
Chunk Loop Start (chunk=2) => Transpose => Loop End (generate new ids, keep iterations)
But somehow doesn’t work! Loop End is crashing I am doing something wrong?
I’m guessing your loop end fails because you now have different column names. Have you checked the ‘Allow Variable Column Types’ and ‘Allow changing table specifications’ options in the loop end as well?