Mar-27-2019, 09:25 AM
Hi,
I'm trying to sort a large txt file on 2 columns: date and then time: I've enclosed a small sample of this:
1,2,3,4,5,6,7,8,9,10
20190218,17:12:57,1903,1,0,,,,,20190217
20190218,18:8:34,1903,1,0,,,,,20190217
20190218,0:0:37,1903,1,0,,,,,20190218
20190218,11:46:48,1903,1,0,,,,,20190218
The list above is in the correct order I am looking for... ie sorted first by column 10 (date) and then by column 2 (time)
the actual data files are approx 20MB
i am struggling with the
any help would be great.
thanks
I'm trying to sort a large txt file on 2 columns: date and then time: I've enclosed a small sample of this:
1,2,3,4,5,6,7,8,9,10
20190218,17:12:57,1903,1,0,,,,,20190217
20190218,18:8:34,1903,1,0,,,,,20190217
20190218,0:0:37,1903,1,0,,,,,20190218
20190218,11:46:48,1903,1,0,,,,,20190218
The list above is in the correct order I am looking for... ie sorted first by column 10 (date) and then by column 2 (time)
the actual data files are approx 20MB
i am struggling with the
sorted()method particularly with converting the time from a string to a time.
any help would be great.
thanks