Each post has a list of tags. Count how often each tag is used (tag → count) and store it in result, using explode first.
import pandas as pd
posts = pd.DataFrame({
"post_id": [1, 2, 3, 4],
"tags": [["sale", "laptop"], ["phone"], ["sale", "phone", "offer"], ["laptop", "offer"]],
})Store your final answer in a variable named result.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.