I have a very large CSV
data file, which I imported it to my active Notebook:
data = Import["filepath/myData.csv"]; (* data is a square matrix*)
Some calculations:
output = Inverse[data];
Then:
Export["output.mx", newFile];
Then:
Import["newFile.mx"]
To Extract the first 3 columns:
newFile[[All,3]]
I only get the 1st column because Import
does not take the entire file. Why?
newfile[[All, ;;3]]
to get the first three columns. YournewFile[[All, 3]]
means "take only the third column of all rows". Also confused by your code here: What is in the variablenewFile
? Did you mean that to beoutput
? Also, you export to "output.mx", but import from "newFile.mx": is that right? $\endgroup$ – MarcoB Feb 1 at 16:01newFile
, with which I meantoutput
. All these data operations withimport/export
aim to circumvent my computer's RAM problem. I do calculations to produce theoutput
but at the time theoutput
is produced, RAM is full. Therefore, I save theoutput
to my hard disk & recall it for further calculations. Can you suggest the shortest way of doing what I described here? Thanks for your comment and would accept it as an answer if you post it. $\endgroup$ – Tugrul Temel Feb 1 at 16:29