How to generate a widget based on selecting an option from a dropdown menu? I have an example code is given below?
from ipywidgets import * x = Dropdown(options=['a', 'b']) #y = Dropdown(options=['1', '2']) x.observe(change_x, 'value') HBox([x])
For example, based on selecting 'a' It should create and display a second drop-down menu 'y' and on selecting 'b' It should create and display a text box.
Thank you.
2.1m questions
2.1m answers
60 comments
57.0k users