title: How to use tqdm with pandas in a jupyter notebook?
body: <p>I'm doing some analysis with pandas in a jupyter notebook and since my apply function takes a long time I would like to see a progress bar.
  Through this post <a href="https://stackoverflow.com/questions/18603270/progress-indicator-during-pandas-operations-python">here</a> I found the tqdm library that provides a simple progress bar for <a href="https://github.com/tqdm/tqdm#pandas-integration" rel="noreferrer">pandas operations</a>. 
  There is also a <a href="https://github.com/tqdm/tqdm#ipython-jupyter-integration" rel="noreferrer">Jupyter integration</a> that provides a really nice progress bar where the bar itself changes over time.</p>
  
  <p>However, I would like to combine the two and don't quite get how to do that. 
  Let's just take the same example as in the documentation</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from tqdm import tqdm
  
  df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
  
  # 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!")
  
  # Now you can use `progress_apply` instead of `apply`
  # and `progress_map` instead of `map`
  df.progress_apply(lambda x: x**2)
  # can also groupby:
  # df.groupby(0).progress_apply(lambda x: x**2)
  </code></pre>
  
  <p>It even says "can use 'tqdm_notebook' " but I don't find a way how. 
  I've tried a few things like</p>
  
  <pre><code>tqdm_notebook(tqdm.pandas(desc="my bar!"))
  </code></pre>
  
  <p>or</p>
  
  <pre><code>tqdm_notebook.pandas
  </code></pre>
  
  <p>but they don't work.
  In the <a href="https://github.com/tqdm/tqdm/blob/master/tqdm/_tqdm.py" rel="noreferrer">definition</a> it looks to me like  </p>
  
  <pre><code>tqdm.pandas(tqdm_notebook(desc="my bar!"))
  </code></pre>
  
  <p>should work, but the bar doesn't properly show the progress and there is still additional output.</p>
  
  <p>Any other ideas?</p>