I have a dataframe say
df1 = pd.DataFrame({"col1": [1, 2, 3],
"col2": [4, 5, 6],
"col3":[7, 8, 9]})
and another dataframe say df2
df2 = pd.DataFrame({"colA": [10, 20, 30],
"colB": [40, 50, 60],
"colC":[70, 80, 90]})
I need to combine these two dataframe such that they form a dictionary like
col1 col2 col3
{1:10} {2:20} {3:30}
{4:40} {5:50} {6:60}
{7:70} {8:80} {9:90}
Now obviously this can be done using loops and apply function but I was looking for a more one liner or vector approach to do this because I have very large number of columns and rows and thus this needs to be optimized.