InterviewSolution
Saved Bookmarks
| 1. |
How will you efficiently load data from a text file? |
|
Answer» We can use the METHOD NUMPY.loadtxt() which can automatically read the file’s header and footer lines and the comments if any. This method is highly efficient and even if this method feels less efficient, then the data should be REPRESENTED in a more efficient format such as CSV etc. Various alternatives can be considered depending on the version of NumPy used. Following are the file FORMATS that are supported:
|
|