<jupyter_start><jupyter_text>Welcome to Jupyter NotebooksJupyter notebooks have become very popular in recent years. They allow you to combine code, text, visualizations and other web-based elements all in a single place and are great for collaboration. All notebooks are composed of cellsJupyter Notebooks are composed of **cells**. Every bit of content within a Jupyter Notebook, including this text, resides within a **cell**. Markdown and Code cellsThere are two primary types of cells - **Markdown** and **Code** cells. This current cell is a markdown cell. Markdown is a simple plain-text language that allows you to add some basic styles and links with little effort. This class will not cover markdown, but it is easy to learn.For nearly all of the class, you will be working inside a **Code** cell. Code cells are where you write and execute your Python code.![][1] Executing CellsTo execute the contents of a code cell with Python inside of it press **shift + enter**. If the last line of code in your cell produces any output, then this value will be displayed in the **`Out`** cell directly below it. If your last line of code produces no output, then there will be no **`Out`** cell. Run the following cell by pressing **shift** + **enter**[1]: images/code_cell.png<jupyter_code># press shift enter to execute this cell
5 + 4<jupyter_output><empty_output><jupyter_text>Best features of the notebook Tab code completionSince the notebook is running directly off of IPython, it takes advantage of all it has to offer. One of the most common and popular features is tab completion. Place your cursor after the dot below and press tab. A menu should pop up of all the available methods for strings.<jupyter_code># run this cell
s = 'a random string'
# place your cursor after the dot and press tab
s.<jupyter_output><empty_output><jupyter_text>Docstring help with `shift + tab + tab`Now we will pop up the docstrings. After we choose an object we can press **shift** + **tab** + **tab** to pop up the docstrings which are helpful in giving us information on how to use the object.<jupyter_code># put the cursor in the word find and press 'shift + tab + tab'
s.find<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0658193372673627, 'fraction_numerical': 0.0018157058556513845, 'mean_word_length': 4.846153846153846, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '437740', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 573, 'n_tokens_neox': 564, 'n_words': 339, 'path': '0. Jupyter Intro.ipynb', 'repo_name': 'STATWonderWoman/Intro-to-Data-Science-with-Python', 'size': '2203'}