Getting an employees experience with a task, relative to the time they completed a previous task
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
This is what I would like to get back:
Out[15]:
Vaughn Informatica 11
Vaughn Python 9
kodams Spotfire 8
kodams java 5
sreddy python 2
I need to get a users amount of experience with a each certain task type. This is all I could come up with when trying to solve this problem:
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']))
Any help is greatly appreciated, Thank you very much.