gpt4 book ai didi

google-sheets - 谷歌表格 : how to find the average of values in one column grouped by another column's values?

转载 作者:行者123 更新时间:2023-12-04 16:48:20 25 4
gpt4 key购买 nike

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

Column1|Column2
A|1
A|2
A|3
A|4
B|1
B|2

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

我应该看 query ?或使用 pivot tables ?

最佳答案

通过数据透视表

Range: Sheet1!A1:B7

Rows:
Group by: Column1

Columns:
Group by: Column2

Calculated Field:
Forumula: =AVERAGE=(Column2)
Summarise by: Custom

结果
            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

注意:我不知道如何将文本总计更改为平均值

关于google-sheets - 谷歌表格 : how to find the average of values in one column grouped by another column's values?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33990582/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com