I need to implement lazy loading in Mathematica. I have a 600 MB CSV text file that I need to process. This file contains many duplicate entries:
1;0;0;13;6 1;0;0;13;6 .......... 2;0;0;13;6 2;0;0;13;6 .......... etc.
Therefore, instead of loading them all into memory, I would like to create a list containing entries and the number of times this entry was found in the file:
{{10000,{1,0,0,13,6}}, {20000,{2,0,0,13,6}}, ...}
I could not find a way to do this using the import function. I'm looking for something like
Import["my_file.csv", "CSV", myProcessingFunction]
where myProcessingFunction will take one record at a time and create a dataset. Can this be done using import or any other Mathematica function?
import wolfram-mathematica text-processing
Max
source share