Skip to content

Instantly share code, notes, and snippets.

@Thuruv
Created December 6, 2014 01:22
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 Thuruv/bb061eb9d6c97853a861 to your computer and use it in GitHub Desktop.
Save Thuruv/bb061eb9d6c97853a861 to your computer and use it in GitHub Desktop.
__author__ = 'c_thv'
__path__ = "c:/users/c_thv/desktop/de.csv"
import csv
import numpy
# x = {}
# #loading the file in numpy
# result=numpy.array(list(csv.reader(open("c:/users/c_thv/desktop/de.csv","rb"),delimiter=','))).astype('string')
# #print result[0][1] #row number and the col like RC style
# for i in result:
# x[i[0]] = i[1:]
def thilip(getfile):
#empty dict
aname = {}
#loading the file in numpy
result=numpy.array(list(csv.reader(open(getfile,"rb"),delimiter=','))).astype('string')
#print result[0][1] #row number and the col like RC style
for rows in result:
aname[rows[0]] = rows[1:]
return aname.keys()
thilip('c:/users/c_thv/desktop/de.csv')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment