Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

read csv and store in dictionary python

import csv

with open('coors.csv', mode='r') as infile:
    reader = csv.reader(infile)
    with open('coors_new.csv', mode='w') as outfile:
        writer = csv.writer(outfile)
        mydict = {rows[0]:rows[1] for rows in reader}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #csv #store #dictionary #python
ADD COMMENT
Topic
Name
5+6 =