count_freq data
3 [['58bcd029', 2, 'expert'],
['58bcd029', 2, 'user'],
['58bcd029', 2, 'expert']]
2 [['58bcd029', 2, 'expert'],
['58bcd029', 2, 'expert']]
1 [['1ee429fa', 1, 'expert']]
so I want to get the count of 'expert' and 'user' from every row of data frame and from every list. And after getting a count of experts and users, I want to store the respective ids in another list. I have tried converting them into the dictionary and calculate using key but it is not working. Can anyone help me doing this?
I want the dataframe in this format:
count_freq count_expert ids count_user ids
3 2 ['58bcd029','58bcd029'] 1 ['58bcd029']
2 2 ['58bcd029','58bcd029'] 0 []
1 1 ['1ee429fa'] 0 []