I wonder if there exists way to work with large files in Mathematica ? Currently I have a file about 500Mb with table data.
Import["data.txt","Table"];
What is alternate way?
I wonder if there exists way to work with large files in Mathematica ? Currently I have a file about 500Mb with table data.
Import["data.txt","Table"];
What is alternate way?
Use
OpenRead["file"]
which gives you anInputStream
object on which you can useRead[stream]
. Depending on the formatting of the data file you may need to set custom option values inRead[]
forRecordSeparators
.Example:
The function
DumpSave
can also be helpful for saving large datasets. It saves data in Mathematica's internal format, so it's more efficient in both time and file size.You could also load your data into a database (for example MySQL) and access it from Mathematica using DatabaseLink