Daily Dose of Data Science

Share this post

Declutter Your Jupyter Notebook Using Interactive Controls

www.blog.dailydoseofds.com

Discover more from Daily Dose of Data Science

High-quality insights on Data Science and Python, along with best practices — shared daily. Get a 550+ Page Data Science PDF Guide and 450+ Practice Questions Notebook, FREE.
Over 36,000 subscribers
Continue reading
Sign in

Declutter Your Jupyter Notebook Using Interactive Controls

A lesser-known and underrated way to boost your data analysis.

Avi Chawla
Jun 25, 2023
29
Share this post

Declutter Your Jupyter Notebook Using Interactive Controls

www.blog.dailydoseofds.com
2
Share

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

This makes data exploration:

  • irreproducible,

  • tedious, and

  • unorganized.

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

Instead, leverage interactive controls using IPywidgets.

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

  • sliders

  • dropdowns

  • text fields, and more.

As a result, you can:

  • explore your data interactively

  • speed-up data exploration

  • avoid repetitive cell modifications and executions

  • organize your data analysis.

A quick demo is shown below:

Interactive controls demo

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

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (350+ pages) with 250+ tips.


👉 Read what others are saying about this post on LinkedIn and Twitter.

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

Review Daily Dose of Data Science

👉 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.

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

Share Daily Dose of Data Science

👉 Sponsor the Daily Dose of Data Science Newsletter. More info here: Sponsorship details.


Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

29
Share this post

Declutter Your Jupyter Notebook Using Interactive Controls

www.blog.dailydoseofds.com
2
Share
Previous
Next
2 Comments
Share this discussion

Declutter Your Jupyter Notebook Using Interactive Controls

www.blog.dailydoseofds.com
Ryan Brown
Jun 25Liked by Avi Chawla

One of the most helpful tips I've seen! I use Altair for visualization and they have dropdown methods but they're super clunky with limited functionality; I've been looking for something like this. Changes the game for sure, thank you!

Expand full comment
Reply
Share
1 reply by Avi Chawla
1 more comment...
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing