Interactive Controls — An Underrated Jupyter Gem That Deserves More Attention

Declutter your Jupyter notebook and boost your data analysis in seconds.

While using Jupyter, one often finds themselves in situations where they repeatedly modify a cell and re-rerun it.

This makes data exploration irreproducible and time-consuming.

What’s more, the notebook also gets messy and cluttered.

To address this, one of the things I actively leverage in my Jupyter notebooks is interactive controls using IPywidgets.

A single decorator (@interact) allows us to add:

  • sliders

  • dropdowns

  • text fields, and more.

As a result, one can:

  • explore the data interactively

  • speed-up data exploration

  • avoid repetitive cell modifications and executions

  • organize the data analysis.

A quick demo is shown below:

As demonstrated above, the decorator adds sliders, dropdowns, etc., greatly reducing the clutter that would have happened otherwise.

Want to try this out?

I prepared this Jupyter Notebook for you to get started: Interactive Controls Notebook.

👉 Over to you: What are some other ways to elegantly explore data in Jupyter that you are aware of?

👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights.

The button is located towards the bottom of this email.

Thanks for reading!

Latest full articles

If you’re not a full subscriber, here’s what you missed last month:

To receive all full articles and support the Daily Dose of Data Science, consider subscribing:

👉 Tell the world what makes this newsletter special for you by leaving a review here :)

👉 If you love reading this newsletter, feel free to share it with friends!

Reply

or to participate.