P
by polsonmila on 18 Feb 2022, edited 20 Feb 2022
#
reformed_dict = {}
#Iterating over the sample_list_of_nestdict
for outerKey, innerDict in sample_list_of_nestdict[0].items:
for innerKey, values in innerDict.items():
reformed_dict[(outerKey, innerKey)] = values
print(reformed_dict)
#the multi index pandas data frame
df2 = pd.DataFrame.from_dict(reformed_dict, orient='index').transpose()
df2.columns = pd.MultiIndex.from_tuples(df2.columns)
df2
M
by Moult on 20 Feb 2022
#
I quickly skimmed through the Pandas documentation and perhaps pd.DataFrame.from_records(sample_list_of_nestdict)
might be what you're after.
P
by polsonmila on 23 Feb 2022
#
+1 votes
Thank you all. @Moult , @Gorgious, @vpajic and @Coen. I have been able to solve the problem. I extracted the wall property set and I am working on them in pandas.
I am still trying to extract external walls coordinates in relation to the project north. If you have any suggestion, I will appreciate it.
Thanks.