Ipywidget accordion is expanded by default when the notebook is executed for the first time. How to make the accordion collapsed by default ?
Thanks in Advance.
Ipywidget accordion is expanded by default when the notebook is executed for the first time. How to make the accordion collapsed by default ?
Thanks in Advance.
Set selected_index = None
when creating the Accordion.
from ipywidgets import Accordion, FloatSlider
acc = Accordion(children=[FloatSlider()], selected_index=None)
display(acc)