oyekomova wrote: > Thanks for your help. I compared the following code in NumPy with the > csvread in Matlab for a very large csv file. Matlab read the file in > 577 seconds. On the other hand, this code below kept running for over 2 > hours. Can this program be made more efficient? FYI - The csv file was > a simple 6 column file with a header row and more than a million > records. > >
There is some facility to read simply-formatted files directly into NumPy. You might try something like this. numpy.fromfile('somename.csv', sep=',') and then reshape the array. -Travis -- http://mail.python.org/mailman/listinfo/python-list