KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm operating with huge CSV files (20-25Mln rows) and don't want to split them into smaller pieces for a lot of reasons. My script reads a file row by row using csv module. I need to now a position (byte number) of the line which will be read on the next iteration (or which just was read). I tried >>> import csv >>> f = open("uscompany.csv","rU") >>> reader = csv.reader(f) >>> reader.next() .... >>> f.tell() 8230 But it seems csv module reads the file by blocks. Since when I keep on iteration I get the same position >>> reader.next() .... >>> f.tell() 8230 Any suggestions? Please advice.
Tags (comma-separated)
Save Edits
Cancel