Let's say i have this 'Employee' data-set:
Designation Name
0 Developer Raj
1 CTO Sam
2 CEO Suzy
3 CFO Anne
4 COO Rohan
I would want to convert this data-frame to a dictionary like this:
[{'Designation': 'Developer', 'Name': 'Raj'}, {'Designation': 'CTO', 'Name': 'Sam'}, {'Designation': 'CEO', 'Name': 'Suzy'}, {'Designation': 'CFO', 'Name': 'Anne'}, {'Designation': 'COO', 'Name': 'Rohan'}]