I want to create a CSV file to save a dictionary. The keys of the dictionary should be columns and values should be rows. How can I do it?
E.g.
The following dictionary should be written to CSV as follows:
dict = {'A':[1,2,3,4,5],'B':[10,20,30,40,50],'C':[100,200,300,400,500]}
A | B | C |
1 | 10 | 100 |
2 | 20 | 200 |
3 | 30 | 300 |
4 | 40 | 400 |
5 | 50 | 500 |