I use the GroupBy to aggregate data in a list and for some rows, the result will be an empty list .
Now I want to filter/separate rows, where the result column contains an empty list. The row filter only offers missing/not missing, which does not apply here; for the moment I resort to convert the list to a string and filter for the literal string (“[ ]”), but this seems awkward, as I want to maintain the list data type. Is there a more elegant approach?
I don’t know of any simple “out of the box” solution. I have a component called Collection Inspection which has any option to return the count of elements in a list. It might work for you. You could use this and then filter out where it returns 0…
The above uses Column Expressions so requires you have the KNIME Expression extension installed.
Similarly if you can install other extensions, you could install the Vernalis Nodes, as within that extension there is a Collection Size node, which would do the same job (more elegantly than my component )
why do you don’t use in addition the count-aggregation (missing disabled) on the same column as your list selection in your group by node? You then get 0 for all empty lists and could filter the data based on this information.