I had a doubt about groupby operations. Lets suppose I have grouped my data based on one column and got 5 groups as output. I know that we can iterate over these groups and apply functions to them as a whole. But can I access the elements of each group (for example I have 5 groups each having 5 rows, can I access those rows one by one). I want to apply a function that compares two rows of a single group based on one or more parameters of the rows belonging to that group.
Year Rank Final_Score Team 2000 1 50 A 2000 2 35 B 2000 3 65 C 2003 3 20 B 2003 1 53 C 2003 2 44 A
If I have grouped by years such that the two groups would be group for year 2000 and 2003 respectively. I want to compare row1 and row2 of group 2000 by comparing their attribute Final Score and for this I need to access each row in the group. Can I do that by grouby()?