I am trying to load a .csv file into an array. However, the file looks something like this.
"myfilename",0.034353453,-1.234556,-3,45671234
,1.43567896, -1.45322124, 9.543422
.................................
.................................
I am trying to skip the leading string. I've been doing away with the first row till now.
a = np.genfromtxt(file,delimiter=',',skiprows=1)
But I was wondering if there's a way to read into an array ignoring the string at the beginning in processing.
csvmodule?csv, you'd need to convert all of the strings to numbers yourself, manually filter out the stuff you don't want (the strings which are strings and not numbers) and then convert the entire thing into a numpy array.genfromtextis meant to handlecsvfiles, although (AFAIK) not ones with "strings" in them.