I have a file that contains about 2000 rows and 100000 columns and the size of the file is about 350 MB. I am trying to load that file into python by doing this
data = pd.read_csv('data.txt', header=None, delim_whitespace=True).as_matrix()
and I just noticed that in my Task manager python.exe uses about 7GB of memory. Note that the line of code shown above is the only task that I did so far besides loading the necessary libraries. What is causing this and how can I fix it ?
Edit: My question is not really related to the thread you indicated since the thread is about handling large files and I am working with a 350MB file and the main purpose of my question is to figure out why it takes 7GB of memory to store a 350MB file.