I am trying to split my List into different groups based on a certain value each item in the List has, and then find the average of another value in those groups.
T
Check this out:
students.GroupBy(s => s.Level, s => s.GPA, (level, scores) => new { Level = level, Avg = scores.Average() }