df=pd.read_csv("C:Tasks_Revised_For_Analysis.csv")
Print(df['AssignedTo'], df['TaskType'], df['DaysExperienceWithTask'],
Out[15]:
Vaughn Informatica 7
kodams Spotfire 8
sreddy python 2
Vaughn informatica 4
kodams java 5
Vaughn Python 9
这是我想回来的:
Out[15]:
Vaughn Informatica 11
Vaughn Python 9
kodams Spotfire 8
kodams java 5
sreddy python 2
我需要获得每种特定任务类型的用户经验。这是我尝试解决此问题时能想到的一切:
def RelativeTaskTypeExp (UsernameIn, TechIn, DateIn):
usertasks = {all} where user = UsernameIn
usertechtasks = {usertask} where tech = TechIn
usertechpasttasks = {usertechtasks} where middledate < DateIn
return usertechpasttasks.count()
all Final.apply(lambda row: RelativeTaskTypeExp(row['AssignedTo'], row['TaskType'], row['EmployeeStartDate'], row['TaskEndDate']))
我们非常感谢您的帮助,非常感谢。