如何使用xlrd分隔excel表中的唯一名称

时间:2015-08-21 02:45:23

标签: python excel xlrd

Engineer    DC          Competency  Date    Effort
Engineer-1  Center-1    Electronics 17-Aug-15   6
Engineer-2  Center-1    Software    13-Aug-15   5
Engineer-3  Center-1    Mechanical  17-Aug-15   6
Engineer-4  Center-1    Testing     17-Aug-15   7
Engineer-5  Center-1    Firmware    17-Aug-15   5
Engineer-4  Center-2    Testing     18-Aug-15   6
Engineer-5  Center-2    Firmware    13-Aug-15   7
Engineer-2  Center-3    Software    18-Aug-15   7
Engineer-3  Center-3    Mechanical  19-Aug-15   6
Engineer-4  Center-3    Testing     19-Aug-15   5
Engineer-2  Center-4    Software    13-Aug-15   4
Engineer-3  Center-4    Mechanical  20-Aug-15   7
Engineer-4  Center-4    Testing     20-Aug-15   6
Engineer-1  Center-5    Electronics 20-Aug-15   5

以下是excel表中的数据,如何分离独特的工程师名称以及每位工程师的工作量和每位工程师的总工作量

           expected output like this-------
                      total effort(effort of each engineer in current week)
       Engineer-1        11
       Engineer-2        16
       Engineer-3        18
       Engineer-4        18
       Engineer-5        12 

我应该使用xlrd使用python代码编写,这里的Engineer-1应该是独立的,而工程师2对于每个工程师来说应该是这样的,我们在第34次花费的总时间是这样的一周

1 个答案:

答案 0 :(得分:0)

您可以像这样使用excel数据透视表。 Link