I intend to get a dictionary with column name as key from a dataframe.
Suppose I have a dataframe:
a b
0 ac dc
1 ddd fdf
I want the output as:
{a : ac, b : dc}
I want it to be done row by row. Any sort of help would be greatly appreciated. Here I want the column name as the key in the resulting dictionary.