I'm trying to create a progress bar for reading excel data into pandas using tqdm. I can do this easily with a csv using the chunksize argument like so:
data_reader = pd.read_csv(path,
chunksize = 1000)
for row in tqdm(data_reader,
total = 200):
df_list = []
df_list.append(row)
Which updates the progress bar for every chunk of 1000 out of 200 total chunks. pd.read_excel
, however, no longer has a chunksize
argument. Is there an alternative?
Edit: I've read the question re: reading an excel file in chunks (Reading a portion of a large xlsx file with python), however, read_excel does not have a chunksize argument anymore and pd.ExcelFile.parse
is equivalent. I am wondering if there is an alternative to the chunksize
argument or another way to create an iterable to loop over chunks while they are being read in.