I have a big dataframe with two columns A and B:
A B
0 US1 URL1
1 US2 URL1
2 US1 URL2
3 US3 URL3
4 US2 URL3
4 US2 URL3
I'd like to obtain a dataframe in which for each unique element in B the count of the unique elements in B and the number of unique element in A associated with b:
B Imp Aud
0 URL1 2 2
1 URL2 1 1
2 URL3 3 2