Skip to main content

Program toCreate a Pandas DataFrame from List of Dicts

· One min read
Kaustubh Kulkarni

Code >

file.vb
import pandas as pd
data = [{'401': 'Python', '402': 'ISSA', '403': 'OT','404':'EAF','405':'KRAI'},
{'401':'Programming','402':'Security','403':'Maths','404':'Architecture','405':'AI'}]
dbs= pd.DataFrame(data, index =['subject','Description'])
print (dbs, "\n")

Output>

Output
 401 402 403 404 405
subject Python ISSA OT EAF KRAI
Description Programming Security Maths Architecture AI