How to convert a dict to dataframe in python

Viewed 28

I want to convert this dictionary to a pandas dataframe. but I am getting an error using result= pd.DataFrame(list(results.items()),columns=['From','Similarity']). Any help will be appreciated

{'TF-IDF': From
0 Overhead Rough-in Additional Lighting and Bra...
1 Complete Remaining Telecom Duct Back tie-in In...
2 MSFT Delivery - ADMIN - UPM - ROJ
3 UPM - ROJ - COLO3- Cell-1
4 Install added DRB#3 Tray and conduit
... ...
1713 Set Exterior Electrical OFCI Equipment - GEN
1714 COLO-4 Cell-3 Conduit rework
1715 Slab on grade
1716 Exterior Equipment Pads - Electrical
1717 Install Roxtec blocks and Install tray/conduit...

                                       To  Similarity  

0 Overhead Rough 0.493
1 Complete Remaining Telecom Duct Back 0.938
2 MSFT Delivery 0.717
3 UPM ROJ COLO 0.811
4 Install added DRB 0.623
... ... ...
1713 Set Exterior Electrical OFCI Equipment 0.975
1714 Below Ceiling Branch Conduit Rough 0.395
1715 Slab on grade 1.000
1716 Set Exterior Electrical OFCI Equipment 0.830
1717 Install Roxtec blocks and Install tray 0.770

[1718 rows x 3 columns]}

0 Answers
Related