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
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
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
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
.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
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
> >
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