我有一个数据表(由 xls 文件填充),其中包含不同种类的水果和豆类。
我从这个数据表中创建一个数据视图,并使用 RowFilter 仅包含土豆和西红柿。
现在,我尝试创建一个分组(使用“名称”列)并从另一列“数量”中求和。
实际上 :
Name | Quantity | color
tomatoe | 2 | red
tomatoe | 1 | red
potatoe | 5 | yellow
tomatoe | 1 | red
potatoe | 1 | yellow
Run Code Online (Sandbox Code Playgroud)
我会返回一个数据表或数据视图,如下所示:
Name | Quantity | color
tomatoe | 4 | red
potatoe | 6 | yellow
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点 ?
抱歉,如果这很简单,但我对此很菜鸟。