In the middle of the desert you can say anything you want

18 Oct 2023

tqdm for iterators with known lengths; manual updating

Add a total= int parameter to tqdm.tqdm()1:

for index, row in tqdm(df.iterrows(), total=df.shape[0]):

Also, you can manually update tqdm bars:

with tqdm(total=num_articles, desc="total") as pbar:
	# ...
	# or just pbar.update()
Nel mezzo del deserto posso dire tutto quello che voglio.