I’m working on a project in Python where I need to extract specific columns of data from a large CSV file and write it to a new file.
I’m currently using the pandas library to read the CSV and select the columns, but it’s taking a long time to process the file. Are there any ways to optimize this process and make it run faster?
>Solution :
Maybe usecols parameter of pandas.read_csv() is what you are looking for?
Example: https://www.statology.org/pandas-read_csv-usecols/