trange

trange(*args, **kwargs)

A shortcut for tqdm(xrange(args), *kwargs). On Python3+ range is used instead of xrange.

tgrange

tgrange(*args, **kwargs)

A shortcut for tqdm_gui(xrange(args), *kwargs). On Python3+ range is used instead of xrange.

tnrange

tnrange(*args, **kwargs)

A shortcut for tqdm_notebook(xrange(args), *kwargs). On Python3+ range is used instead of xrange.

tqdm_pandas

tqdm_pandas(tclass, *targs, **tkwargs)

Registers the given tqdm instance with pandas.core.groupby.DataFrameGroupBy.progress_apply. It will even close() the tqdm instance upon completion.

Parameters

  • tclass : tqdm class you want to use (eg, tqdm, tqdm_notebook, etc)
    targs and tkwargs : arguments for the tqdm instance

Examples

>>> import pandas as pd
>>> import numpy as np
>>> from tqdm import tqdm, tqdm_pandas
>>>
>>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
>>> tqdm_pandas(tqdm, leave=True)  # can use tqdm_gui, optional kwargs, etc
>>> # Now you can use `progress_apply` instead of `apply`
>>> df.groupby(0).progress_apply(lambda x: x**2)

References

https://stackoverflow.com/questions/18603270/ progress-indicator-during-pandas-operations-python