import pandas as pd df = pd.read_csv('some_data.csv', usecols = ['col1','col2'], low_memory = True)
Here is what the above code is Doing:
1. We’re reading in the csv file using the read_csv() function.
2. We’re specifying the columns we want to read in using the usecols parameter.
3. We’re specifying that we want to read in the data as a low memory object using the low_memory parameter.