Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99124

How can I get a tqdm progress_apply bar in vscode + python jupyter extension?

$
0
0

I am trying to display a progress bar when I perform "vector"progress_apply operations on pandas dataframes, in MS Visual Studio Code.

In VS Code with the Python extension enabled, I tried in a cell

import pandas as pd 
from tqdm import tqdm_notebook, tqdm_pandas 

tqdm_notebook().pandas()

df = pd.DataFrame({'a' : ['foo', 'bar'], 'b' : ['spam', 'eggs']}) 
df.progress_apply(lambda row: row['a'] + row['b'], axis = 1)

And the result is

progress bar render fails with vscode

and the progress bar is not rendered. I would like a progress bar to render a bit like it happens with

from tqdm import tqdm

for i in tqdm(range(len(df))):
    pass

progress bar render works with tqdm

I am puzzled because the syntax above works fine in "classic" Jupyter notebooks on Firefox

progress bar render works with classic Jupyter

How can I visualize the progress bar when I run pandas progress_apply in vscode?


Viewing all articles
Browse latest Browse all 99124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>