0

I'm using Pandas, and I would like to use the TQDM progress bar in the notebook.

After loading TQDM:

from tqdm.auto import tqdm
tqdm.pandas()

and applying a function to the Pandas Dataframe:

new_df = df.progress_apply(...)

I get as output, instead of the progress bar:

HBox(children=(FloatProgress(value=0.0, max=21375.0), HTML(value='')))

I already seen this SO answer, but I'm not sure how to do it within a Watson notebook.

Vincenzo Lavorini
  • 1,884
  • 2
  • 15
  • 26
  • 1
    Consider using tqdm in text mode. https://stackoverflow.com/a/42218684/5629418 This does not require a notebook extension that's disabled by default in Watson Studio on Cloud. – Roland Weber Jun 29 '20 at 05:31

1 Answers1

2

Watson studio environments do not have "widgetsnbextension" notebook extension by default enabled.

In order to enable it, create a custom environment and enable "Esri ArcGIS" extension which will enables widgetsnbextension for ipywidgets when you start a notebook with this custom environment defintion.

enter image description here

https://dataplatform.cloud.ibm.com/docs/content/wsj/getting-started/faq.html#can-i-add-arbitrary-notebook-extensions

Once enabled, create new notebook with this custom environment definition.

enter image description here

Reference on how to create custom environment https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/customize-envs.html

charles gomes
  • 2,145
  • 10
  • 15