I have a large excel file with a lot of sheets and it take ~3.5 min to read one sheet. I am currently ready 2 sheets from an excel which increases the run time to ~7 min.
Here is the script I use
fileaddress = "C:\Users\prashant.kumar\Desktop\myfile.xlsx"
s1= pd.read_excel(fileAddress, sheet_name='sheet1',skiprows=1).drop(0, axis=0)
s2= pd.read_excel(fileAddress, sheet_name='sheet2',skiprows=4).drop(0, axis=0)
print("Loaded both sheets")
Is there any way in python where I can make multiple processes/threads where each process/thread reads sheet1
simultaneously while the other process/thread reads sheet2
and once both the processes/threads are done my script will move forward