Does pandas read the whole file even when usecols is used?
According to the documentation, it will read the whole file (no way to only read columns from disk), but will only parse and store the columns given in the use_cols variable (emphasize mine):

usecols : list-like or callable, optional
Return a subset of the columns... Using this parameter results in much faster parsing time and lower memory usage.
I'm using pandas to read a file inside a rest service. The file is huge with more than 100 columns. But I only want to read just first two columns. I know I can use usecols in read_csv but I was wondering how exactly it works?
Does pandas read the whole file and filter out the required columns?
Or does it only read the required columns?
I'm asking because I don't want to overload the memory.