One method is to use Counter
to get the top 3 unique items from the list, filter your DataFrame based on those items, and then perform a groupby operation on this filtered DataFrame.
from collections import Counter
c = Counter(df.item_id)
most_common = [item for item, _ in c.most_common(3)]
>>> df[df.item_id.isin(most_common)].groupby('item_id').sum()
user_id
item_id
a 3
b 5
c 1