I am running file processing with larger (>1G) files on a fare more weaker machine. I hardly believe your case ran into a limitation. In my experience the never ending program is more possible, than the one running out of memory.
Try catching the exception that occurs, and print out the line number. The other way is to write the out a "rejected records" file.
Based on my experience the problem will be a malformed record having less then six columns, maybe the last one or the header.
If possible try to write the program line oriented, ie do not read in the whole file.
for line in open(fname):
process line, write other files, do aggregation whatever
If everything else fails, and you firmly believe you reached some hard barrier, import it to an sqlite3 database. That can reach terrabytes...