将带有json的pandas datafreame转换为长表

时间:2018-08-16 11:03:21

标签: python json pandas

请帮我转换熊猫的数据框,看起来像

users_id, users_items 
1085,["item_1","item_3","item_12"]
2000,["item_10","item_3","item_8","item_13"]
3044,["item_8","item_1"]

到数据框的样子

users_id, users_items 
1085,"item_1"
1085,"item_3"
1085,"item_12"
2000,"item_10"
2000,"item_3"
2000,"item_8"
2000,"item_13"
3044,"item_8"
3044,"item_1"

0 个答案:

没有答案