I'm trying to read in 14 columns of data from a csv with ~300 rows and ~3 million columns. To my understanding, the point of the usecols parameter in pandas.read_csv is that I can just read in the columns I want to save time and memory when I don't need all the columns.
However, reading in 14 columns with 300 rows takes almost a minute, regardless of whether or not I specify data types for all the columns and index (done using timeit):
Load time with dtypes: 55.114283496979624
Load time without dtypes: 54.37552756909281
I would expect reading a dataframe with shape (300,14) to be a lot faster than a minute. Is the slowness because pandas has to read all 3 million headers before deciding what columns to read in? How can I make this faster?