计算分组值的小计

2024-10-01 15:42:53 发布

您现在位置:Python中文网/ 问答频道 /正文

Error Message     occurred_time
no boxes            00:09:03  
no boxes            00:01:03
full boxex          00:00:03  
empty boxes         00:00:06 
empty boxes         00:00:03
full boxex          00:00:14

我有一个带有一列错误消息的df,以及一列错误消息发生的时间

我根据频率对它们进行分组 df.groupby(['Error Message',]).size() 知道我想计算相同错误消息的总和。我该怎么做


Tags: no消息messagedftime错误时间error

热门问题