I have a dictionary like that:
dictionary = {'user1':[{'product1':10}, {'product2':15}, {'product3': 20}],
'user2':[{'product1':13}, {'product2':8}, {'product3': 50}]}
I want to construct a dataframe where I can see user1 and user2 as indices, product1, product2 and product3 as columns and values of these products should be values of columns. I tried looking here and found this post Construct pandas DataFrame from items in nested dictionary, but my format of data is different and I can't find out how to make products to be my columns. So far I get "'product1':10" as my value in the first column of the first row. Using orient='index' made my main keys as indices, but that's it. Please, help me.