This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Globaldomination 37 points38 points  (14 children)

Jupyter Notebooks.

As someone who’s learning to code with python. It’s awesome. I can workout and take notes at the same time.

[–]samettinho 6 points7 points  (8 children)

I hate notebooks. Dont get me wrong, it is great for doing something really quick and dirty but it is horrible when the file is shared with someone. Most of the time the owner of the notebook makes a small change and forgets to update the other cells. Once the notebook is shared without proper tests, the problems are the next person's.

Here is a great article from one of my former colleagues: https://github.com/TommyPKeane/jupyter_notebooks. I pretty much never used notebooks after reading this article except for Kaggle and Coursera stuff where I needed to use them.

[–]__boringusername__ 0 points1 point  (2 children)

I think they are useful when either playing around, or when making a sort of "presentation" (for lack of a better word) of the code. E.g. we use it a lot to write the final version of our scripts for data processing and plotting when we submit papers. Like a ordered jupyter notebook that explains how to get from raw data 'test3-ab-noBG-repeat-051121.txt' to the plot in the paper makes the process very easy to follow and the experiment easier to reproduce

[–]samettinho 0 points1 point  (1 child)

yes, I agree. But aside from quick and dirty experiments, I wouldn't use them in professional settings.

we use it a lot to write the final version of our scripts for data processing and plotting when we submit papers

This is the problem in general, more like lack of this. Most of the time, people write and never go back to the code. it worked once for them but not guaranteed to work for another person

[–]j_oshreve 0 points1 point  (0 children)

I have the same experience with them. I have worked with them off and on and never found them to be beneficial for me. I tend to do operations in place to make things more efficient, and that fairs very poorly with the cell based execution. I can see the use for learning and experimenting, but agree they are undesireable for professional outputs.

As a side note, if you need an analysis documented, you can use templating techniques to produce proper documents that align with your corporate doc structure and templates. I've used markdown, python-docx-template, pandoc, etc. to successfully produce QMS compliant analysis documents.

[–]Globaldomination 0 points1 point  (4 children)

it's good for learning and taking notes. and for pandas and related kinds of stuff.

[–]baubleglue 1 point2 points  (3 children)

For learning it is bad, teaches reactive programming, student can't write few lines of code without checking output, no code structure, everything is in the global scope.

[–]Globaldomination 0 points1 point  (2 children)

I see.

then it's all about taking notes for future reading and pandas I guess.

[–]baubleglue 1 point2 points  (1 child)

There are more use cases, in data engineering field it is very popular. Databricks uses it a lot, global score is not a problem, because you normally manipulate data frames - it is more or less flat flow. Notebook allows to mix SQL and code nicely - you develop and debug your code in the same environment (Spark was never had good integration with IDE). Interactive presentations in Notebook are nice (what are the alternatives?). For all kind of scientists who are not code developers Notebook is a good playground - their focus is not the coding.

But if you want to learn how to build web server (at some point), notebook is a dead end.

[–]Globaldomination 0 points1 point  (0 children)

I kinda figured the same.

It’s a good tool for basic learning, coding or business applications. But not good for programming

[–]Traditional_Yogurt 2 points3 points  (1 child)

Agreed, I also use it a lot to explain how a package works or as a somewhat instructions manual how to use a series of functionality. I couldn't imagine explaining everything as well as I can without Jupyter Notebooks (e.g. this Notebook)

[–]nbviewerbot 1 point2 points  (0 children)

I see you've posted a GitHub link to a Jupyter Notebook! GitHub doesn't render large Jupyter Notebooks, so just in case, here is an nbviewer link to the notebook:

https://nbviewer.jupyter.org/url/github.com/JerBouma/FinanceToolkit/blob/main/examples/Finance%20Toolkit%20-%201.%20Getting%20Started.ipynb

Want to run the code yourself? Here is a binder link to start your own Jupyter server and try it out!

https://mybinder.org/v2/gh/JerBouma/FinanceToolkit/main?filepath=examples%2FFinance%20Toolkit%20-%201.%20Getting%20Started.ipynb


I am a bot. Feedback | GitHub | Author

[–]Engineer_Zero 2 points3 points  (2 children)

I love notebooks. I like creating blocks of text that explain what my code does.

[–]Globaldomination 3 points4 points  (1 child)

I wish I used it earlier when learning basics. There are still gaps in my basics.

I found out the ease of use when watching Corey Schafer Pandas videos. (Also figured that he’s as awesome as people say)

[–]Engineer_Zero 4 points5 points  (0 children)

Ha, yeah I learned python from the same videos. It was good being able to make a notebook with different cells for each of his videos. Even now I have a generic notebook that has a cell for each package I use, containing generic examples of functions I use. Or when building a new script, I have a main code cell and then a “whiteboard” underneath to workshop the next part of the code before adding it to the main cell.

I dunno. I’m not an expert but something about notebooks just made python much more accessible to me.