Create a Pandas DataFrame from a Dict

import pandas as pd

data = {'name': ['Nick', 'David', 'Joe', 'Ross'],
        'age': ['5', '10', '7', '6']} 
new = pd.DataFrame.from_dict(data)
  
new
    name age
0   nick   5
1  david  10
2    joe   7
3   ross   6

References:

  • 1How to convert Dictionary to Pandas Dataframe?
Previous
Next