How do I implement a progress bar in jupyter-notebook?
I\'ve done this:
count = 0
max_count = 100
bar_width = 40
while count <= max_count:
tim
Here is a solution (following this).
from ipywidgets import IntProgress
from IPython.display import display
import time
max_count = 100
f = IntProgress(min=0, max=max_count) # instantiate the bar
display(f) # display the bar
count = 0
while count <= max_count:
f.value += 1 # signal to increment the progress bar
time.sleep(.1)
count += 1
If the value that's changing in the loop is a float instead of an int, you can use ipwidgets.FloatProgress instead.