I have a data frame:
A B C
0 xx No 1
1 xx No 2
2 xx Yes 3
3 xx Yes 4
4 xx No 1
5 xx No 2
6 xx No 3
7 xx Yes 4
8 xx No 1
9 xx No 2
If want to create a column that counts the number of times a number appear in column C, when column B is equal to Yes
so the output would be
A B C countifs
0 xx No 1
1 xx No 2
2 xx Yes 3 1
3 xx Yes 4 2
4 xx No 1
5 xx No 2
6 xx No 3
7 xx Yes 4 2
8 xx No 1
9 xx No 2
Is this possible?