- #1
sourish_SUNY
- 1
- 0
This is my problem:
I would like to read data (saved in a text file) from a file. My data is written in a matrix format (1,000,000 rows x 3 columns).
I want to read a data from a particular line, say row number 90,000.
Since the number of rows is large, it will be very expensive if I have to do an empty read() for 89,999 rows.
Is there a way I can directly go to row number 90,000 (without reading the lines before it) and read the corresponding data? I do have control over how the text file is created.
Will really appreciate any help or advice on this.
Thank You,
SC
I would like to read data (saved in a text file) from a file. My data is written in a matrix format (1,000,000 rows x 3 columns).
I want to read a data from a particular line, say row number 90,000.
Since the number of rows is large, it will be very expensive if I have to do an empty read() for 89,999 rows.
Is there a way I can directly go to row number 90,000 (without reading the lines before it) and read the corresponding data? I do have control over how the text file is created.
Will really appreciate any help or advice on this.
Thank You,
SC