OSArch Community

Ifcopenshell-Python beginner

  1. P
    
    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
    
  2. M

    I quickly skimmed through the Pandas documentation and perhaps pd.DataFrame.from_records(sample_list_of_nestdict) might be what you're after.

  3. P

    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.

  1. Page 1
  2. 2

Login or Register to reply.