I have the column having List of Dictionaries , the length of list is varying . Just like shown below:
id Categories
1 [ { "S" : "Restaurants" }, { "S" : "Drinks" }, { "S" : "Catch Up With Friends" }]
2 [ { "S" : "Drinks" }, { "S" : "Rooftop" }, { "S" : "Outside" }]
3 [ { "S" : "Drinks" }, { "S" : "Rooftop" }]
4 [ { "S" : "Drinks" }, { "S" : "Nights" }, {"S":"Restaurant"}]
.
.
.
I want to place the list of dictionary into separate columns of DataFrame. Output should look like :
Category 1 Category 2 Category 3 ....
Category 1 will represents (S:Restaurants)
Category 2 will represents (S:Drinks)
Category 3 will represents (S:Nights) etc ..
How is it possible , if anyone suggest better solution than this , it will also be appreciate able.My aim is just to unpack the list of dictionaries and place as a column into dataframe. If it is in integer form , it will be good.