I have a dataframe and I want to replace missing values with empty dictionaries then flatten the dataframe. I did as follows: