У меня есть данные в фрейме данных в следующем формате:
df=pd.DataFrame([
[42,{"tags":["illustration","logo","design","ui"]}],
[81,{"tags":["typography","icon","vector","ux"]}],
[98,{"tags":["branding","app"]}],
[52,{"tags":["animation","web","flat"]}],
[17,{"tags":["type","lettering"]}],
[37,{"tags":["illustration","typography","branding","typography","branding"]}],
[63,{"tags":["logo","icon","app","web","lettering"]}],
[47,{"tags":["ui","ux"]}],
[6,{"tags":["design","vector","icon","flat","lettering","branding","app"]}],
[53,{"tags":["ui","ux","lettering","branding","app","animation","web","flat"]}],
[64,{"tags":["branding","app","typography","branding"]}],
[89,{"tags":["typography","branding","ux","lettering","branding"]}]
],columns=["_id","tags"])
Я хочу посчитать число 'id' с определенным количеством тегов (распределение этого числа), поэтому для данных над нимбудет:
Number of posts Number of tags
3 2
1 3
3 4
3 5
1 7
Как мне обработать текстовые теги в заданном формате для этой задачи?
Спасибо