I am trying to process an excel file with ~600k rows and ~10 columns.
I want to execute some program line by line (or row by row) as if it is an iterator (like txt/csv files). However, if I use xlrd
or pandas
to read the excel file, it takes ~2-3min for opening the file.
I wonder if it is possible to read the excel file line by line efficiently so that, for example, I can verify my program with the first 10 rows without waiting for a long time for every trial.
Edit: Thank you for suggesting to convert the excel file to a csv before processing. However, I have to create an one-click program to the user. So, I still hope to find out a way to directly read the excel file efficiently, if possible.