I think using an OrderedDict would help a lot. You could do it in a way similar as this:
import csv
from collections import OrderedDict
with open('file.csv') as f:
reader = csv.reader(f, delimiter=';')
list_companies = next(reader) # ['country', 'company1', 'company2', ...]
companies_dict = OrderedDict()
for company in list_companies[1:]: # We forget about 'country'
companies_dict[company] = {} # We initialize the companies' dicts in order
for country_values in reader: # For every line after the first one
country = country_values[0] # We get the country at the beginning of every line
for countries_dict, value in zip(companies_dict.values(), country_values[1:]):
countries_dict[country] = value # And set the value for every company in order
print(dict(companies_dict))
# {'company1': {'finland': '30', 'sweden': '20', 'norway': '10'}, ...}
The zip function might be new to you, it's a generator that basically takes two (or more) iterables and puts the elements in the same position together as a set. For example, zip(['finland', 'sweden' , 'england'], [30, 30, 40]) == [('finland', 30), ('sweden', 30), ('england', 40)]
This might not be exactly correct for your purpose but I believe it's a good enough approach to what you want to achieve.