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
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
I am puzzled because the syntax above works fine in "classic" Jupyter notebooks on Firefox
How can I visualize the progress bar when I run pandas progress_apply
in vscode?