I would just recommend to try it, it's really simple and definitely worth the time.
It is basically a notebook with a python interpreter. You can write notes in the notebook, but you can also write python code in the notebook and execute it. Executed python code will cause the notebook to display the result (if any).
It is perfect for trying/playing around, or to show people how you solved some problem. Not so much for writing entire programs.
Yeah, trying to write anything substantial gets convoluted really quick. I write the program in pycharm, and then import it into the jupyter for interactive visualization.
I tend to do it the other way around. Experiment with different algorithms and visualise the results. Once I am happy with it, copy the code over to pycharm into neat little classes and commit.
No, for your use case it sounds like an interactive notebook works perfectly. But if you ever want to create something with lots of classes, each with tens of methods, you really should put each class in a separate file, and the best way to organize and debug all of that is a traditional IDE.
For me the magic of jupyter/pandas is I don't have to implement my own plotting methods and wrangle with matplotlib directly. I just store data as pandas dataframes, import my module into jupyter, and then do object.data.plot() to get beautiful inline plots.
I like the sound of that. I use basic matplotlib for checking but I always used pandas to prepare data for a tableau friendly format.
Honestly I have not touched a class or method.. I only have a few custom functions which I modified from stackoverflow.com. I bet there is so much more I could implement to save time and gain more insights. I'm using pandas like excel.
There are many uses of the Jupyter notebook. The three that come to mind are:
Demonstrating code: Notebooks are a great way to mix explanation of code (through markdown cells) with the code itself. It makes it easy to walk the reader through the your own thinking. For example, you can define helper function and explain what they do, then show the ultimate result using those functions, and finally explain the significance of the results. This is especially useful for education or for scientific computing. In both cases, it's important that the reader fully understand the code and its purpose.
Development: Many python programmers have a workflow that makes heavy use of the interactive prompt. For example, when writing a function, you might open up the prompt, load example arguments as global variables, and then try things until you get the result you want. The problems with this strategy are that it lacks organization and that you end up typing the same thing again and again. The notebook gives you essentially an interactive prompt, but also allows you to save blocks of code that you might want to execute again.
Plotting: The main way I use notebooks... I often create a pandas DataFrame with non-notebook code and pickle it for future use. Then I open up the notebook and can inspect the DataFrame, alter it as I see fit, and plot it inline. That is, I can write a plotting line like `seaboarn.factorplot('weight', 'diabetes', hue='economic_class') and see the results right there, tweaking the plot as I desire. Later, I can then completely log out of my computer and easily return to my previous state by loading and running the notebook.
It's not a replacement for an IDE or a text editor. I view it as a glorified interactive prompt, and a communication tool.
As someone suggested try it out. It is a little different that regulate IDE programming. Some compare it to MatLab and similar apps I the way code and output is handled.
If you are new to programming, realize that this is a conceptually a different way to develop code. However it has great potential for a number of disciplines from research to education.
Basically, it is a system somewhere between a console and an IDE-
you write your code in a sequence of cells, and execute them- typically top to bottom, but you can change/run any cell in the program.
It is excellent for the kind of explorations, and simple computations, that I run in to as a mathematician.
It would likely not be as excellent for app development, but for quick-and-dirty writing of short algorithms and the like, it is in my opinion unparalleled.
7
u/xilni Jan 29 '16
ELI12 Jupyter please.
I'm just some stupid Python newbie who's happy to use IntelliJ IDEA for his Python work.