I want to obtain distribution of tags from this dataframe:
df=pd.DataFrame([
[43,{"tags":["webcom","start","temp","webcomfoto","dance"],"image":["https://image.com/Kqk.jpg"]}],
[83,{"tags":["yourself","start",""],"image":["https://images.com/test.jpg"]}],
[76,{"tags":["en","webcom"],"links":["http://webcom.webcomdb.com","http://webcom.webcomstats.com"],"users":["otole"]}],
[77,{"tags":["webcomznakomstvo","webcomzhiznx","webcomistoriya","webcomosebe","webcomfotografiya"],"image":["https://images.com/nt4wzguoh/y_a3d735b4.jpg","https://images.com/sucb0u24x/b1sd_Naju.jpg"]}],
[81,{"tags":["webcomfotografiya"],"users":["myself","boattva"],"links":["https://webcom.com/nk"]}],
],columns=["_id","tags"])
I need to get a table with number of 'id's with specific number of tags. eg.
Number of posts | Number of tags
31 9
44 8
...
129 1
I used this approach for the case when 'tags' is the only field. In this dataframe I also have 'image', 'users' and other text fields with values. How should I handle data in this case?
Thank you