Working in Notebooks
Repository ยท Notebook
Subscribe to our newsletter
๐ฌ Receive new lessons straight to your inbox (once a month) and join 40K+ developers in learning how to responsibly deliver value with ML.
Set up
- Click on this link to open the accompanying notebook for this lesson or create a blank one on Google Colab.
- Sign into your Google account to start using the notebook. If you don't want to save your work, you can skip the steps below. If you do not have access to Google, you can follow along using Jupyter Lab.
- If you do want to save your work, click the COPY TO DRIVE button on the toolbar. This will open a new notebook in a new tab. Rename this new notebook by removing the words Copy of from the title (change
Copy of 01_Notebooks
to1_Notebooks
).
Alternatives to Google Colab
Alternatively, you can run these notebooks locally by using JupyterLab. You should first set up a directory for our project, create a virtual environment and install jupyterlab.
mkdir mlops
python3 -m venv venv
source venv/bin/activate
pip install jupyterlab
jupyter lab
Types of cells
Notebooks are made up of cells. There are two types of cells:
code cell
: used for writing and executing code.text cell
: used for writing text, HTML, Markdown, etc.
Text cells
Click on a desired location in the notebook and create the cell by clicking on the โ TEXT
(located in the top left corner).
Once you create the cell, click on it and type the following text inside it:
### This is a header
Hello world!
Run a cell
Once you type inside the cell, press the SHIFT
and RETURN
(enter key) together to run the cell.
Edit a cell
To edit a cell, double click on it and make any changes.
Move a cell
Move a cell up and down by clicking on the cell and then pressing the โฌ and โฌ button on the top right of the cell.
Delete a cell
Delete the cell by clicking on it and pressing the trash can button ๐๏ธ on the top right corner of the cell. Alternatively, you can also press โ/Ctrl + M + D.
Code cells
Repeat the steps above to create and edit a code cell. You can create a code cell by clicking on the โ CODE
(located in the top left corner).
Once you've created the code cell, double click on it, type the following inside it and then press Shift + Enter to execute the code.
1 |
|
Hello world!
These are the basic concepts we'll need to use these notebooks but we'll learn few more tricks in subsequent lessons.
To cite this content, please use:
1 2 3 4 5 6 |
|