I am working with a 468 MB zip file that contains a single file, which is a CSV text file. I don't want to extract the entire text file, so I read the zip file a binary chunk at a time. The chunk size is something like 65536 bytes.
I know I can read the file with Python's csvfile library, but in this case, the chunks that I feed it will not necessarily fall on a line boundary.
How can I do this? (p.s., I do not want to have to use Pandas)
Thanks.
ZipFilemodule allows you to create a stream to the zip file. You can then use this incsv.reader(). It won't read the entire thing into memory.