0

I am not sure of why i am getting the error mentioned. Here, is the code which contains the numpyload.txt

   def load(name):
print("start  reading file with target")
wfile = open(name, "r")
line = wfile.readline().replace("\n", "")
print line
splits = line.split(",")
print splits
datalen = len(splits)
print datalen
wfile.close()
X = np.loadtxt(open(name), delimiter=',', usecols=range(0, datalen), skiprows=0)
print("done")
return np.array(X)

Here is the sample output of the csv file. *Note not listing all as there is 501 items in the csv file. Id,asmSize,bytesSize,asmCompressionRate,bytesCompressionRate,ab_ratio,abc_ratio,ab2abc_ratio,sp_,...

  • Try `skiprows=1`. – Mark Dickinson Oct 08 '16 at 14:10
  • Searching SO gave me this: [ValueError: could not convert string to float: id](http://stackoverflow.com/questions/8420143/valueerror-could-not-convert-string-to-float-id) I suppose it is the same issue. –  Oct 08 '16 at 14:15

0 Answers0