Hi all.
I have a problem with loading file of following format:
first 1024 rows are tab delimited and contain from 2 to 256 elements (in
different files different number of columns)
after that 5 empty lines
and at the end  some 20 text lines for description.

I could manage to do it  in this way, after commenting all text part:
a = mlab.load('/home/petro/TEMP/proba.txt',delimiter='\t',comments='%')

I was hoping to use checkrows in cvs2rec to avoid reading of the text part
of file, without commenting it.

a = mlab.csv2rec('/home/petro/TEMP/proba.txt',
checkrows=1023,delimiter='\t',names=['a','b','c','e','f','k','l','h'])
invalid literal for float(): % Date and Time:

But It failed to do so.

a = mlab.csv2rec('probe.txt',
checkrows=1023,delimiter='\t',comments='%',names=['a','b','c','e','f','k','l','h'])
This gives kind of strange format for my use and needs names to be
specified.
In addition changing of checkrows to 500 (or any other number) had no effect
on size of record I get.

loadtxt from numpy  unfortunately does not have option checkrows.

Any idea how to do it without commenting.

Thanks.
Petro.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to