Hi I would like to know how I can count the number of rows for each group in a large dataset. Below is a sample dataset. There are many more groups and the number of groups and people assigned to them differ with every excel file.
Hello @anonymous3,
What do you mean by counting number of rows??
For example group 1, you got 4 people smthg like that??
Hi @Pradeep_Shiv ,
Yes, so the output will show me (Group 1: 4, Group 2: 2, Group 3: 6, Group 4: 1, Group 5: 3).
cool, Try the below expression
(From row in dataTable.AsEnumerable Where row(0).ToString.Equals(“3”)).Count
Cheers
Hi @Pradeep_Shiv ,
Thank you for the reply. How do I perform this code in Uipath Studios? Also how does this code show the number of rows in each group, could you help explain it?
using assign activity,
let me give you sample, give me a minute!
Hi @Pradeep_Shiv ,
Thank you for the sample file. Also, I have an additional question. When you read one group (e.g. Group 1), how can I make it so that the bot display the count/position of each row? For example, Group 1 has 4 people inside so the bot output will show:
Group 1:
1
2
3
4
This will be shown instead of just the number 4. It does not have to show the name of the people.
Hi
If you want names too you can try this (From row in outSample.AsEnumerable Where row(0).ToString.Equals(“3”) Select row(1)).Tolist()
Hi
sorry I dont understand what you have mentioned in the bracket, can u explain it?
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.