I have a dict with values that are like the following:
something_dict = {
'item1' : 'value1',
'item2' : 'value2',
'item3' : 'value3',
'item4' : [
'category1' : 'value1',
'category2' : 'value2',
'category3' : 'value3'
] ]
}
I'm trying to create 2 dataframes that will look like this
1st df
category1 | category2 | category3
value1 | value2 | value3
2nd df
item1 | item2 | item3
value1 | value2 | value3
so far I've tried the following code which only returns the last row
something = something_dict['item4']
1st_df = {}
for i in range(len(something)):
something_df['item1'] = something[i]['value1']
something_df['item2'] = something[i]['value2']
something_df['item3'] = something[i]['value3']