Created
December 6, 2014 01:22
-
-
Save Thuruv/bb061eb9d6c97853a861 to your computer and use it in GitHub Desktop.
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
__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