Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python create dictionary from csv

mydict = {y[0]: y[1] for y in [x.split(",") for x in open('file.csv').read().split('
') if x]}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #create #dictionary #csv
ADD COMMENT
Topic
Name
4+1 =