Created
March 15, 2018 05:51
-
-
Save RameshKamath/cbd24498afedcfa98bc8717342a7b0ae to your computer and use it in GitHub Desktop.
simple code for accessing CVS file and getting data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""simple code for accessing csv file and getting data""" | |
dic={} | |
import csv | |
with open('filename.csv') as f: | |
ln= f.readlines() | |
for i in ln[1:]: | |
dic[i.split(',')[0]]=int(i.split(',')[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment