[Numpy-discussion] convert csv file into recarray without pre-specifying dtypes and variable names

Vincent Nijs v-nijs at kellogg.northwestern.edu
Fri Jul 6 20:20:08 EDT 2007

I wrote the attached (small) program to read in a text/csv file with
different data types and convert it into a recarray without having to
pre-specify the dtypes or variables names. I am just too lazy to type-in
stuff like that :) The supported types are int, float, dates, and strings.

I works pretty well but it is not (yet) as fast as I would like so I was
wonder if any of the numpy experts on this list might have some suggestion
on how to speed it up. I need to read 500MB-1GB files so speed is important
for me.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: load.py
Type: application/octet-stream
Size: 2601 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070706/6c9c3bc8/attachment.obj>

More information about the NumPy-Discussion mailing list