Trying to import a small (15 MB) CSV file and the Import command is either not responding or responding very slowly. Watching the memory usage of the Mathematica kernel when initializing the command it hits some maximum and stalls without changing for several minutes.
I assumed the size of the file would be small enough for it to do this without any real issues. The data I'm trying to import is seven rows, each with 721 columns, where each entry is 148 points.
I've tried this technique
<< JLink`;
InstallJava[];
ReinstallJava[JVMArguments -> "-Xmx1024m"]
Where I change the last few numbers, but I didn't see any improvement. Maybe I'm misunderstanding what's bogging it down.
I can successfully use Import to grab image files and for other CSV files. The images and CSV files are 2 orders of magnitude smaller in file size, though.
csvfile into two or three parts and try importing them. Could you share the file, or a part of the file? – anderstood Nov 15 '16 at 18:06f = OpenRead["test.csv"];ReadList[f, Number, RecordSeparators -> {","}];Close[f];typically much faster thanImport– george2079 Nov 15 '16 at 19:13Importis I suspect treating each of those 140 point sublists as a string. – george2079 Nov 15 '16 at 19:35{}. ie,..{1,2,3...148},{...},{...}– george2079 Nov 15 '16 at 19:46Partitionafterwards. For example, if one line is{1,2,3},{4,5,6}, you could flatten it as1,2,3,4,5,6, export it, import it back and partition if as{1,2,3},{4,5,6}. – anderstood Nov 15 '16 at 20:45