我想得到我拥有的每个userprofileid
的totalhours
和totalminutes
的数量。
例如:
userprofileid totalhours totalminutes
453 7.0 420
120 7.5 450
453 8.0 480
我无法删除userprofileid
,因为每个id都有自己的时间和分钟。
我试过了,但我得到了小时和分钟的总数,并将它们添加到每一行中。
for user in clocking_left["userprofileid"]:
clocking_left["user_minutes_total"] = clocking_left["totalminutes"].sum()
clocking_left["user_hours_total"] = clocking_left["hours"].sum()
您可以使用“分组依据”并汇总这些值
输出
相关问题 更多 >
编程相关推荐