How would I create a nested dictionary given a csv file in
Python? Say I want to make a dictionary that read
{'country':{'China':'Fit', 'China':'Overweight', 'USA':
'Overweight', 'USA': 'Fit', 'England':'Fit'...},
'category':{'Asian':'Fit', 'Caucasian': 'Overweight',
'Caucasian':'Overweight', 'Asian': 'Fit', 'Middle Eastern':
'Fit'...}}
given a file that had
country category Weight
China Asian Fit
China Caucasian Overweight
USA Caucasian Overweight
USA Asian Fit
England Middle Eastern Fit...
...
And so on in the file.