Python Openpyxl:如何删除excel文件中的重复项,同时使用pandas在另一列中添加另一个值
我想问的是,你如何使用熊猫来制作预期的输出 如果这是我正在做的电子表格Python Openpyxl:如何删除excel文件中的重复项,同时使用pandas在另一列中添加另一个值,python,pandas,Python,Pandas,我想问的是,你如何使用熊猫来制作预期的输出 如果这是我正在做的电子表格 Name Total Bruce $240 Selina $800 Bruce $600 我需要输出为: Name Total Bruce $840 Selina $800 我的问题是,我将如何对熊猫做到这一点 groupby(Name) loop the group write new dataframe for instance with the su
Name Total
Bruce $240
Selina $800
Bruce $600
我需要输出为:
Name Total
Bruce $840
Selina $800
我的问题是,我将如何对熊猫做到这一点
groupby(Name)
loop the group
write new dataframe for instance with the sum of group Total