Simultaneously Filtering By Column and Row Data Split

All of this data is in a single table. There are three sets of column types: 1) those I wish to retain with every iteration, 2) Those that designate if a particular feature is present for a unique identifier (ListingId), and 3) a column matching another in type 2 but have a calculated value (SHAP). Directly below are examples of column types 2 and 3, which we wish to pair during each iteration. Below them are column type 1, which I wish to retain with every iteration.

To this point we pair up the column examples 2 and 3 along the the four columns we retain for every iteration.

However, I wish to split the data in the columns by row values in column type two, designated with only a 1 or 0 in each row.

We would split the data into two sets: our column types 2 and 3 along with the permanent type 1 columns we always retain, but also by row values of 1 or 0.

This iterates over all columns until we’ve matched all related column types 2 and 3.

Data table attached here.

column-row-data-table.csv

I have tried all kinds of loops (group loop, column list loop, and others) with various permutations of row filters and math formulas in between, and often end up with my workflows correctly parsing out one column, but never all columns.

Any suggestions are appreciated.