Google Sheets:如何查找一列中按另一列值分组的值的平均值?

max*_*axm 6 google-docs google-sheets

假设我有一个包含以下数据的 Google 表格:

Column1|Column2
A|1
A|2
A|3
A|4
B|1
B|2
Run Code Online (Sandbox Code Playgroud)

我想找到按 Column1 的值分组的 Column2 中的值的平均值,因此输出如下所示:

A|2.5
B|1.5
Run Code Online (Sandbox Code Playgroud)

我应该查看查询吗?或者使用数据透视表

Dij*_*aaf 3

通过数据透视表

Range: Sheet1!A1:B7

Rows: 
   Group by: Column1

Columns: 
   Group by: Column2

Calculated Field: 
   Forumula: =AVERAGE=(Column2)
   Summarise by: Custom
Run Code Online (Sandbox Code Playgroud)

结果

            1   2   3   4   Grand Total
A           1   2   3   4   2.5
B           1   2           1.5
Grand Total 1   2   3   4   2.166666667
Run Code Online (Sandbox Code Playgroud)

注意:我无法弄清楚如何将文本“总计”更改为“平均”