I have a huge csv file (like 8GB or much more, with millions of lines), the first field is a text field (no quoting), the second one is a date in the format mm/dd/yyyy. The other fields may vary. No header, utf8 encoding. See an example here:
Lorem ipsum dolor sit amet,10/30/2020,2340.234450,pet,999
consectetur adipiscing elit,10/30/2020,54.2,home,577
I need to efficiently (as quick as possible) sort the file by dates, using Python, without loading all the file together into memory. The problem is I have little memory (4GB RAM or so). Older dates should go first.
I found some solutions (e.g. this and this) directly using the OS commands, but none specific to Python and date fields. Also, I cannot use databases. Could you help me?