I have two dictionaries for example:
dict1 = {1:[30], 2:[42]}
where the key is the product code and the values are the average sale
dict2 = {"apple":1, "banana":2}
where the key is the product name and values is the product key.
I want to write a CSV file so that I have:
| product name | product code | average sales |
|---|---|---|
| "apple" | 1 | 30 |
| "banana" | 2 | 42 |
What would be the best way to solve this problem?

