I am trying to get the following dict into a specific DataFrame.
The dict is structured as follows :
test = {'JTTIX US Equity':
{'HB_ASSET_CLASS_ALLOCATION':
{'Equity': '32.14642',
'Debt': '60.890407'},
'HB_MARKET_CAP_ALLOCATION':
{'Small-cap': '0.776239',
'Mid-cap': '10.81831',
'Large-cap': '88.027725'}}}
The final DataFrame that i am trying to reach is :
BBG_ID FIELD TYPE VALUE
JTTIX US Equity HB_ASSET_CLASS_ALLOCATION Equity 32.14642
JTTIX US Equity HB_ASSET_CLASS_ALLOCATION Debt 60.890407
JTTIX US Equity HB_MARKET_CAP_ALLOCATION Small-cap 0.776239
JTTIX US Equity HB_MARKET_CAP_ALLOCATION Mid-cap 10.81831
JTTIX US Equity HB_MARKET_CAP_ALLOCATION Large-cap 88.027725
I tried all the options on this nice answer here Convert list of dictionaries to a pandas DataFrame, but i am still not able to reach the final format i want.
I think i can do it by creating a loop but want to double check if there is a way i can avoid it since the real dict is really big.