'Pandas Create dataframe from Key Value pair dictionary [duplicate]

Assume I have a dictionary in the following format:

{
   "model1": 0.5,
   "model2": 0.6,
   "model3": 0.7
}

How would I load it into a pandas dataframe such that it has the following structure:

Name Accuracy
model1 0.5
model2 0.6
model3 0.7


Solution 1:[1]

Check the doc of from_dict here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Grall