What I have:
I have a dataframe with approx. 20,000 data records.
In the first column are the names of employees ... in the second the value “participated” or “did not participate”.
Each row represents a specific training course.
What I want:
I want to count how many times an employee has attended an event. The result should then be output in a new dataframe.
Condition:
Count all seminars of the employee “Smith” in the first column if the second column contains “participated”.
---
Another column (“Duration”) shows the number of minutes of the course.
In a further run, I would now like to determine the total duration of the course times.
Condition:
Add all the values from the “Duration” column for each employee if the second column contains “participated”.
---
I haven't found anything suitable online.
I also don't want to separate the table beforehand by filtering out the rows in which the second column says “did not participate”.