Answers for "how to get csv data into dictionary python"

1

python create dictionary from csv

mydict = {y[0]: y[1] for y in [x.split(",") for x in open('file.csv').read().split('n') if x]}
Posted by: Guest on October-02-2020

Code answers related to "how to get csv data into dictionary python"

Python Answers by Framework

Browse Popular Code Answers by Language