I have an excel file with two column and I would like to convert it to this format
l = [{'a': 1, 'b': 2},
{'a': 4, 'b': 3}]
a : refers to the first column header and b refers to the second column header.
I imported the excel file using Pandas as
dataframe = pd.read_excel('sample.xlsx')
I tried by creating empty list and set data frame to that empty list but it is not working.