0

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.

  • Can you provide a [mcve]? See also [How to make good reproducible pandas examples](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples). – jpp Jul 06 '18 at 13:08
  • @jpp Thank you for the advice, here is the new question: https://stackoverflow.com/questions/51216338/organizing-rows-based-on-values-from-three-columns – Grant Doyle Jul 06 '18 at 19:03

0 Answers0