我List<object>在object包含的地方有这样的东西Cat,Type和Items.
Cat | Type | Items
--------------------
A | P | 3
A | Q | 4
A | R | 2
A | P | 1
A | Q | 5
B | P | 2
B | Q | 1
B | R | 3
B | P | 9
Run Code Online (Sandbox Code Playgroud)
我想要做的是计算类型的平均项,所以产生这样的东西:
Cat | Type | Items
--------------------
A | P | 2
A | Q | 4.5
A …Run Code Online (Sandbox Code Playgroud)