【发布时间】:2021-06-09 07:10:35
【问题描述】:
我目前有一个 DataFrame,其中包含从一个职位发送到另一个职位的电子邮件信息。
fromJobtitle toJobtitle e-mails
0 CEO CEO 65
1 CEO Director 23
2 CEO Employee 56
3 CEO In House Lawyer 7
4 CEO Manager 104
.. ... ... ...
87 Vice President Managing Director 112
88 Vice President President 385
89 Vice President Trader 78
90 Vice President Unknown 1088
91 Vice President Vice President 2304
我正在寻找一种方法,以便可以获得每个职位的总计数。 示例输出为:
totalJobtitle e-mails
0 CEO 670
1 Managing Director 2341
2 Vice President 4720
3 Employee 3560
4 Trader 250
【问题讨论】:
-
例如,如果发件人或收件人是
CEO,您是否需要计算两次电子邮件?如果发送者和接收者相同怎么办?
标签: python pandas dataframe count extract