Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2016 00:34
What would you like to do?
Ipython Progress
from IPython.display import display
import ipywidgets
df = list(range(100))
f = ipywidgets.FloatProgress(min=0, max=len(df))
out = ipywidgets.Output()
display(f, out)
for i in df:
f.value += 1
if not i % 10:
with out:
print("We are at {} of {} ({:.0f}%)"
.format(i, len(df), 100*i/len(df)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment