Selecting the top 50 rows of a table by a control column

Hi @sys4381 and welcome to KNIME Community,

You can use the Row Sampling node to pick equal number of rows from a class (Randomly). Just select the “Stratified sampling” option the configuration window of the node and select the class column. You can choose how many rows you want in the output (absolute or relative).

But if you insist to keep the first 50 rows in each class then I think you have to use the Group Loop Start node (include the class column) and the Row Filter node (Include row by number) to achieve that.

:blush:

6 Likes