7

I have a radio button widget in a Jupyter notebook and I want to save the selected state, preferrably in the notebook json. That doesn't seem to be happening when I save the notebook. The state gets lost and reset when you reopen the notebook. Is there a way to save the state and have it reload?

John Kitchin
  • 2,236
  • 1
  • 17
  • 25

1 Answers1

1

To save a widget state in a jupyter notebook use Save Notebook Widget State menu item (Widgets>Save Notebook Widget State). From ipywidgets:

A notebook file may be saved with the current widget state as metadata. This allows the notebook file to be rendered with rendered widgets

enter image description here

jayveesea
  • 2,886
  • 13
  • 25