Python计数转换和聚合日期到月份列

2024-04-25 03:54:50 发布

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

我有一个数据集,我试图分解和统计每月发生的次数。我还需要转换最终结果,为每个月/每个事件添加一列

Report_ID    Report_name    timestamp    
1            Profit         8/1/2018 06:10:40
2            Revenue        8/5/2018 09:25:45
1            Profit         8/29/2018 10:11:30
2            Revenue        9/1/2018  09:45:22

输出:

^{pr2}$

Tags: 数据namereportid事件次数timestampprofit