May-16-2017, 08:17 PM
Hi, everybody.
I have a very large text file (1.3 terabytes). The first 8 lines of this file are meta-information. I want to remove these lines and then import the rest of the files into a NoSQL database.
but I'm getting the error 'file' object has no attribute 'writeline'.
I am using this Python code:
I have a very large text file (1.3 terabytes). The first 8 lines of this file are meta-information. I want to remove these lines and then import the rest of the files into a NoSQL database.
but I'm getting the error 'file' object has no attribute 'writeline'.
I am using this Python code:
fout = open("subset.vc", "w") with open( 'hugefile.vcf', "r" ) as fin: # Ignore header lines for _ in range(8): next(fin) # Transfer data to output file for line in fin: fout.writeline(line) fout.close()