Skip to content

tqdm.pandas(tqdm_notebook) does not work #473

@watercrossing

Description

@watercrossing
  • I have visited the [source website], and in particular
    read the [known issues]
  • I have searched through the [issue tracker] for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable

The documentation states that:

# Register `pandas.progress_apply` and `pandas.Series.map_apply` with `tqdm`
# (can use `tqdm_gui`, `tqdm_notebook`, optional kwargs, etc.)
tqdm.pandas(desc="my bar!")

but when I do

import pandas as pd
import numpy as np
from time import sleep
from tqdm import tqdm, tqdm_notebook

tqdm.pandas(tqdm_notebook)
_ = pd.DataFrame(np.random.randint(0, 100, (1,20))).progress_apply(lambda x: sleep(0.1))

It prints the progress using text version, not the widget. tnrange works just fine.

Output of pip freeze (latest ipython[all], latest tqdm git master, python 3.6.0)

alabaster==0.7.10
Babel==2.5.1
bleach==2.1.1
certifi==2017.7.27.1
chardet==3.0.4
decorator==4.1.2
docutils==0.14
entrypoints==0.2.3
html5lib==1.0b10
idna==2.6
imagesize==0.7.1
ipykernel==4.6.1
ipyparallel==6.0.2
ipython==6.2.1
ipython-genutils==0.2.0
ipywidgets==7.0.3
jedi==0.11.0
Jinja2==2.9.6
jsonschema==2.6.0
jupyter-client==5.1.0
jupyter-core==4.3.0
MarkupSafe==1.0
mistune==0.7.4
nbconvert==5.3.1
nbformat==4.4.0
nose==1.3.7
notebook==5.2.0
numpy==1.13.3
pandas==0.20.3
pandocfilters==1.4.2
parso==0.1.0
pexpect==4.2.1
pickleshare==0.7.4
prompt-toolkit==1.0.15
ptyprocess==0.5.2
Pygments==2.2.0
python-dateutil==2.6.1
pytz==2017.2
pyzmq==16.0.2
qtconsole==4.3.1
requests==2.18.4
simplegeneric==0.8.1
six==1.11.0
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
terminado==0.6
testpath==0.3.1
tornado==4.5.2
-e [email protected]:tqdm/tqdm.git@42f213b4055c97b614fcbea2c9adee45baba5c76#egg=tqdm
traitlets==4.3.2
urllib3==1.22
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.0.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions