Help with ipywidgets example code (capturing widget output)

Hi I came across this tutorial ( and for some reason I can not get the “Capturing Widget Output” example to work. The dropdown widget will display, but if I choose any year or ALL, the dataframe does not render. The code seem straightforward as it is just trying to clear the output before rendering the dataframe. I am running the classic jupyter notebook. I have tried both Brave browser and FireFox and still do not get the intended results.

Here is my gist:

Thanks in advance for any assistance I can get on this. BTW, this is my first post and did not know there was such thing as a Jupyter community forum. I hope this is the correct medium or format for getting this kind of help. If not, I apologize!

Ooops, nevermind! Found what my problem was. The animated gif in the article’s example hid the critical last line that I needed:


1 Like