Skip to content

Instantly share code, notes, and snippets.

@RameshKamath
Created March 15, 2018 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RameshKamath/cbd24498afedcfa98bc8717342a7b0ae to your computer and use it in GitHub Desktop.
Save RameshKamath/cbd24498afedcfa98bc8717342a7b0ae to your computer and use it in GitHub Desktop.
simple code for accessing CVS file and getting data
"""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