Declutter Your Jupyter Notebook Using Interactive Controls
A lesser-known and underrated way to boost your data analysis.
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:
👉 Over to you: What are some other ways to elegantly explore data in Jupyter that you are aware of?
👉 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 :)
👉 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!
👉 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.
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!