If I have 100 columns in a dataframe and I want to create dictionaries of pair of columns, the key would always be a fixed columns. How can it be done?
Let's say we have a dataframe like this:
k v1 v2 ... v99
============================
i 1 2 ... 9
ii 11 22 ... 99
iii 111 222 ... 999
...
I would want dictionaries dict_v1
, dict_v2
... dict_v99
. For example dict_v2
would be:
{'i': 2, 'ii': 22, 'iii': 222, ...}