Pandas/Python memory spike while reading 3.2 GB file
问题 So I have been trying to read a 3.2GB file in memory using pandas read_csv function but I kept on running into some sort of memory leak, my memory usage would spike 90%+ . So as alternatives I tried defining dtype to avoid keeping the data in memory as strings, but saw similar behaviour. Tried out numpy read csv, thinking I would get some different results but was definitely wrong about that. Tried reading line by line ran into the same problem, but really slowly. I recently moved to python 3