Newbie - converting csv files to arrays in NumPy

2007-01-09 Thread oyekomova
I would like to know how to convert a csv file with a header row into a floating point array without the header row. -- http://mail.python.org/mailman/listinfo/python-list

Read CSV file into an array

2007-01-09 Thread oyekomova
I would like to know how to read a CSV file with a header ( n columns of float data) into an array without the header row. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-10 Thread oyekomova
w the real data data = array(datalist, dtype = float) elapsed=time.clock()-t1 print elapsed Robert Kern wrote: > oyekomova wrote: > > I would like to know how to convert a csv file with a header row into a > > floating point array without the header row. > > Use t

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-13 Thread oyekomova
Thanks to everyone for their excellent suggestions. I was able to acheive the following results with all your suggestions. However, I am unable to cross file size of 6 million rows. I would appreciate any helpful suggestions on avoiding memory errors. None of the solutions posted was able to cross

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-13 Thread oyekomova
.txt') ) data = [ map(float, row) for row in reader ] data = array(data, dtype = float) print 'Data size', len(data) print 'Elapsed', time.clock() - start #make_data() read_test() On Jan 13, 5:47 pm, "sturlamolden" <[EMAIL PROTECTED]> wrot

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-14 Thread oyekomova
Thank you so much. Your solution works! I greatly appreciate your help. sturlamolden wrote: > oyekomova wrote: > > > Thanks for your note. I have 1Gig of RAM. Also, Matlab has no problem > > in reading the file into memory. I am just running Istvan's code that > >

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-16 Thread oyekomova
Travis- Yes, I tried your suggestion, but found that it took longer to read a large file. Thanks for your help. Travis E. Oliphant wrote: > oyekomova wrote: > > Thanks to everyone for their excellent suggestions. I was able to > > acheive the following results with all your sugge