Re: [Numpy-discussion] Extracting data from genfromtxt?

2011-03-19 Thread Rohaq
On Sat, Mar 19, 2011 at 01:52, Ben Gamari wrote: > On Fri, 18 Mar 2011 20:27:17 +0000, Rohaq wrote: > > There could be a lot more than 2 other columns, Result3,Result4, etc., > > so I need to code it to be scalable; if this were acting like a normal > > dict, I could write

[Numpy-discussion] Extracting data from genfromtxt?

2011-03-18 Thread Rohaq
I've got a CSV file with the following layout: Location,Result1,Result2 1,0,0 2,0,0 3,1,0 4,1,0 5,1,1 6,0,1 7,0,1 8,0,0 ...etc., and I've loaded it using the following: import numpy as np data = np.genfromtxt('file.csv',delimiter=',',dtype=None,names=True) Resulting in the following: array([(1