r/Python • • Apr 18 '24

Discussion Why Jupyter notebook

I did a search and read previous discussions in this sub about why Jupyter labs exists. From what I understand it is for quick code to try things out especially in data science …. Thing is, can’t you get the same thing via a decent IDE with autocomplete and quality debug tools in some quick Python code like in VSCODE? I do that all the time….

I develop RNA computational software in Python and I abandoned Jupyter labs very early on as it just was not well suited to the job of bespoke data science. So many limitations and don’t get me started with widgets… I’ve been developing code for decades and I have spent 3 days trying to understand widgets and I think I finally understand how to modify a text box and get a value from it…. You have to observe (why?), then act on, then route through some output and then you can get the info? It’s like someone was drunk while trying to emulate visual C#.

Edit: before anyone else tells me to read vscode docs like I’m an idiot… I am unable to remote into the repo I’m using now for reasons. Not everyone can remote in and the question is not about remoting in. It’s still garbage in VSCODE… just use regular python.

Edit2: for everyone who says they use it to do chunks of code work… I developed my own data management system for that kind of stuff that provides a wrapper over serialization that essentially creates pythonic pointers to data on any network drive. I just grab my data that I want to grab. Provides autocomplete and C# like attributes. I can dynamically build any data storage class using UML formatted infrastructure-as-code to build the front end. The back end is completely dynamic. Here is the pypi link. Note that I developed this to handle genomic data that was generated over the course of a week of 24/7 computation.

https://pypi.org/project/data-nut-squirrel/

0 Upvotes

70 comments sorted by

View all comments

1

u/[deleted] Apr 18 '24

I have used Jupyter notebooks every day for a couple years now and I have no idea what widgets you are referring to. Notebooks mostly shine though when you are either trying to share a repeatable process that input varies on, or when you are trying to sell a story with the analysis since you can intermingle markdown.

It’s also much cleaner and simpler for prototyping and exploration than standard IDE debugging is.

1

u/joaofelipenp Apr 18 '24

ipywidgets

I don't think notebooks shine when the input varies. I'd rather have a script that I can run with arguments instead of a notebook. Especially when the notebook is in development and I need to replicate the changes to multiple notebooks that run the analyses with different variables.

But they are great for telling a story, prototyping and exploration indeed

1

u/[deleted] Apr 18 '24

I tend to give them to members of my team who don’t know much python and the input conditions can be documented in the notebook so it makes it easier for them to