I am trying to figure out the best way of creating tuples with the format: (x:y) from 2 columns in a dataframe and then use column a of the dataframe as the key of the tuple
key data_1 data_2
0 14303 24.75 25.03
1 12009 25.00 25.07
2 14303 24.99 25.15
3 12009 24.62 24.77
The resulting dictionary {14303 24.38:24.61 24:99:25:15 12009 24.62:24.77 25.00:25.07 }
I have tried to use iterrows and enumerate but was wondering if there is a more efficient way to achieve it