gpt4 book ai didi

jupyter-notebook - Ipywidget Accordion 默认行为

转载 作者:行者123 更新时间:2023-12-04 00:27:28 39 4
gpt4 key购买 nike

Ipywidget Accordion 第一次执行 notebook 时默认展开。如何让 Accordion 默认折叠?

提前致谢。

最佳答案

套装selected_index = None创建 Accordion 时。

from ipywidgets import Accordion, FloatSlider
acc = Accordion(children=[FloatSlider()], selected_index=None)
display(acc)

enter image description here

关于jupyter-notebook - Ipywidget Accordion 默认行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55041179/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com