I have a problem reading in data from a CSV file using tabarray (see code below) because the CSV file has a incomplete fields in the last record of the file. As a consequence I get the following error:
File "build\bdist.win32\egg\tabular\io.py", line 170, in loadSVcols
assert (Lens == Lens).all() , 'Not all records have same number of fields.'
AssertionError: Not all records have same number of fields
I need to find a way to read in the file while ignoring the last record but I am unable to figure out how to do this using the tabarray method of reading in the file - see below.
x = tb.tabarray(SVfile = 'myfile.txt',delimiter = ',', headerlines=2,usecols=[1,2,33,35,37], skiprows=324)
Please let me know how I can work around this problem?
Many thanks, Roger