Skip to content

Commit

Permalink
Merge pull request #83 from palewire/markdown
Browse files Browse the repository at this point in the history
comment and markdown content
  • Loading branch information
palewire committed Feb 14, 2023
2 parents 612ff22 + 6423a40 commit 131df1a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/src/groupby.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ accident_counts = accident_list.groupby("latimes_make_and_model").size().reset_i
```

You can clean up the `0` column name assigned by pandas with the `rename` method. The `inplace` option, found on many pandas methods, will save the change to your variable automatically.
When you execute a cell, the code or text inside it will be processed and the output will be displayed below the cell. If the cell contains code, it will be executed by the kernel (the Jupyter notebook's underlying programming language, such as Python) and any output generated by the code will be displayed.

```{code-cell}
:tags: [show-input]
Expand Down
22 changes: 22 additions & 0 deletions docs/src/notebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ number + 3

Now try defining your own numeric variable and doing some math with it. You can name it whatever you want. Want to try some other math operations? The `-` sign does subtraction. Multipication is `*`. Division is `/`.

Sometimes it is helpful to describe what the code is doing in case you want to share it with a colleague or return to it after some time. You can add comments in the cell by putting a hash `#` in front of the text. So, for example, we could use a comment to add extra information about the number variable.

```{code-cell}
# This is a random number
number = 3
```

To add a cell in a Jupyter notebook, you can use the "Insert" menu at the top of the page and select "Insert Cell Above" or "Insert Cell Below". Alternatively, you can use the keyboard shortcut "a" to insert a cell above the current cell or "b" to insert a cell below the current cell. You can also use the "+" button in the toolbar above the notebook to insert a cell below the current cell.

To remove a cell, you can select the cell and press the "dd" key. Alternatively, you can use the "Edit" menu at the top of the page and select "Delete Cells" or you can use the "scissors" button in the toolbar above the notebook to delete the selected cell. Note that when you delete a cell, everything in that cell will be lost and it cannot be undone.
Expand All @@ -85,4 +92,19 @@ To remove a cell, you can select the cell and press the "dd" key. Alternatively,
Cells can contain variables, functions or imports. If you’ve never written code before and are unfamiliar with those terms, we recommend [“An Informal Introduction to Python”](https://docs.python.org/3/tutorial/introduction.html) and subsequent sections of python.org's official tutorial.
```

Everything we have done so far has been in code cells, the default cell type. We can also make text cells, which are useful for giving our notebooks some structure and organization. You can do this by manipulating the pulldown menu in the toolbar directly above the notebook. By default the input is set to "Code." Click the dropdown arrow and change it to ["Markdown,"](https://en.wikipedia.org/wiki/Markdown) a markup language for formatting text similar to HTML.

These cells allow you to create headers, write descriptions, add links and more to add context to your code. ["The Ultimate Markdown Guide"](https://medium.com/analytics-vidhya/the-ultimate-markdown-guide-for-jupyter-notebook-d5e5abf728fd) is a reference on all of the styling that you can draw from. For now, let's try adding a heading and a bulleted list.

```none
## Hashes make headings
- Dashes make
- Bulleted lists
```

## Hashes make headings

- Dashes make
- Bulleted lists

Once you've got the hang of making the notebook run, you’re ready to introduce pandas, the powerful Python analysis library that can do a whole lot more than add a few numbers together.

0 comments on commit 131df1a

Please sign in to comment.