I have a GroupBy object. I want to to remove rows from current group if the same row exists in the previous group. Let's say this is (n-1)th group:
    A   B
0   foo 0
1   baz 1
2   foo 1
3   bar 1
And this n-th group
    A   B
0   foo 2
1   foo 1
2   baz 1
3   baz 3
After dropping all duplicates. Result of n-th group:
    A   B
0   foo 2
3   baz 3
EDIT:
I would like to achieve it without loop if possible
 
    