Click here to return to the list of pages
Data Science is a profession that combines Computer Science, Statistics, and many other disciplines to answer questions about the world. Data Scientists use data and programming to answer real questions. Python is a popular language for Data Science because there are many tools available to make that task easier. Jupyter Notebooks are one such tool.
A graphic shows the concepts of “Computer Science”, “Statistics”, and “Subject Matter Expertise” being merged into “Data Science”.
A Jupyter Notebook is a document that can combine text, code, and the output of code all into one place. Data Scientists use Jupyter Notebooks to share the results of their analysis in such a way that colleagues can review the results and the process.
Screenshots of Jupyter Notebooks are shown.
Once Jupyter has been launched, a new browser window will appear. This window represents a folder on your computer that will store your Jupyter Notebooks. You can choose any existing notebooks, which you may not have yet, by clicking on any files with a “ipynb” extension. You may see other files and folders there, but you can ignore them.
A screenshot of the Jupyter Notebook directory interface is shown, with several files and folders.
To create a new Notebook, click the “New” button in the top right, and then choose the “Python [conda root]” option from the “Notebooks” heading. A new window will open with your freshly created Notebook ready to be edited.
A screenshot of the Jupyter Notebook directory interface is shown, with the “New” button highlighted in the top right.
A Jupyter Notebook is a series of “Cells”. New cells can be created by clicking the “+” button in the top-left. Each cell can contain either Code or Markdown. The type of a cell can be controlled by the drop-down menu in the middle of the top toolbar.
A screenshot of the actual Jupyter Notebook editor is shown, with the
+
button andCell type
drop-down annotated.
Code cells allow you to enter lines of Python code. When you have finished editing the code, you can click the “Run” button in the toolbar. The code will then be evaluated, and any output will be placed directly below the cell.
A screenshot of the actual Jupyter Notebook editor is shown, with the “Run” button annotated.
Cells containing code and graphs are also shown.
Markdown is a way of writing text that will add formatting. This formatting is similar to what you would find in a document editor like Word or Google Docs. For instance, if you put asterixis around a word, it will be italicized. If you put a hash symbol at the beginning of a line, it will become a section header. For more information about writing Markdown, you can check out the documentation in the link provided.
The following raw markdown is shown:
# Header
This text has *italics*.
This text is **bolded**.
And will be translated to the following formatted text:
This text has italics.
This text is bolded.
More information is available on this Markdown Cheatsheet
Once you have created your Notebook, you can share it with others by downloading it. In the top right, click the “File” menu and hover over the “Download as” option. Two useful ways of downloading the Notebook are as “Notebook (.ipynb)” and “HTML (.html)”. The Notebook file is the source file of the document, while the HTML file is shareable with non-programmers.
A screenshot of the Jupyter Notebook editor interface is shown, with the “Download as” menu exposed.
Two arrows indicate that a “Notebook (.ipynb)” file or a “HTML (.html)” file could be generated.