I have a table that looks like this:
Header = Category | US | UK | CA
Row 1 = A | value1 | value1 | value2
Row 2 = B | value2 | value1 | value3
Row 3 = C | value1 | value3 | value1
The column "category" contains unique values. The rest of the columns contain a value that can or cannot be unique. The way to read it is: for category A, US items have this value.
I am trying to create a dictionary so that keys are categories, and values are a dictionary with the countries as keys and the values as values.
Dict = {A : {US : value1, UK : value1, CA : value2}, B :
{US:value2, UK:value1, CA:value3}, C :
{US:value1,UK:value3,CA:value1}}
It's a long list, so I need to create it through iteration. I've been stuck with it all day. I get to create the keys correctly but I can get the "dictionary-values" right.
Is there an easy way to do this?