Quantcast
Channel: KNIME RSS
Viewing all articles
Browse latest Browse all 4157

How to count the member of groups?

$
0
0

I habe a table and grouped it. How can I count the totally records of a group and how to assign a group_id to each record?

For example, in the following table:

Studentcitygenderscore
ConnyBerlinF5
ThomasBerlinM3
YingKaiserslauternF4
KartoffelKaiserslauternF5

I group the table by "city" + "gender", use the node "groupby", so I got three group:

  • group1: Berlin, F
  • group2: Berlin, M
  • group3: Kaiserslautern, F

Question 1: But how can I get the number of total records in each group?

  • group1: Berlin, F => 1 record
  • group2: Berlin, M => 1 record
  • group3: Kaiserslautern, F => 2 records

Question 2: How to assign each records the groud_id?

I want to get this table:

Studentcitygenderscoregroup_id
ConnyBerlinF5group1
ThomasBerlinM3group2
YingKaiserslauternF4group3
KartoffelKaiserslauternF5
 
group3

 Is there a node can do this task?

 

Best Regards,

Ying

 

 


Viewing all articles
Browse latest Browse all 4157

Trending Articles