This is my data frame
Date Name Attempt Count
0 2015-01-02 Adam Yes
1 2015-01-29 Adam Yes
2 2015-02-02 David No
3 2015-03-02 David Yes
4 2015-03-02 Hardik Yes
5 2015-03-02 David No
Now I need to count the number of attempts of a person month-wise. Want to count only if attempt value is 'yes' and insert the value in count column.
This is the expected output
Date Name Attempt Count
0 2015-01-02 Adam Yes 2
1 2015-01-29 Adam Yes 2
2 2015-02-02 David No 0
3 2015-03-02 David Yes 1
4 2015-03-02 Hardik Yes 1
5 2015-03-02 David No 1