Progress Bars in Python

Hours of hard work would go into vain if our program becomes unresponsive during execution. Often we come across large datasets or longer loops that takes a long while to complete such as in Data Scraping.

While these commands are executing and massive loops are being processed behind the screen, it seems like an eternity of waiting time till the whole process is completed. Thus, Creating a Progress Bar would solve this problem.

Progress Bars would help us to look at the progress of our execution and to manage our anxiety levels.

tqdm is a library in Python which is used for creating Progress Meters or Progress Bars. tqdm got its name from the Arabic name taqaddum which means ‘progress’.

Implementing tqdm can be done effortlessly in our loops, functions or even Pandas. Progress bars are pretty useful in Python because:

  1. One can see if the Kernal is still working

  2. Progress Bars are visually appealing to the eyes

  3. It gives Code Execution Time and Estimated Time for the code to complete which would help while working on huge datasets