Lesson 2. Manage Jupyter Notebook Files


In this lesson, you will learn how to manage your Jupyter Notebook files and directories.

Learning Objectives

After completing this lesson, you will be able to:

  • Create new Jupyter Notebook files
  • Rename and delete existing Jupyter Notebook files
  • Create directories using the Jupyter Notebook Dashboard
  • Move Jupyter Notebook files using the Jupyter Notebook Dashboard

What You Need

Be sure that you have completed the lesson on The Jupyter Notebook Interface.

Create New Jupyter Notebook Files

You already know how to open an existing Jupyter Notebook file (.ipynb) from the dashboard.

You can also create new Jupyter Notebook files (.ipynb) from the dashboard.

On the top right of the dashboard, there are two buttons for Upload and New. Upload would allow you to import an existing Jupyter Notebook file (.ipynb) that is not already in that directory.

You can create a new Python 3 Jupyter Notebook file (.ipynb) by clicking on New and selecting Python 3. A new notebook will open a new tab in your web browser.

When you use the Jupyter Notebook dashboard menu to create new Jupyter Notebook files (.ipynb), you will click on the New button and select Python 3.
You can use the Jupyter Notebook dashboard menu to create new Jupyter Notebook files (.ipynb) by clicking on the New button and selecting Python 3.

Rename Existing Jupyter Notebook Files

At the top of the new Jupyter Notebook, you will see that the file is named Untitled.

You can change the name of the file by checking the box next to the filename and selecting Rename. A new window will open in which you can type the new name for the file.

You can use this same process to rename any existing Jupyter notebook.

When you use the Jupyter Notebook dashboard menu to rename Jupyter Notebook files (.ipynb), a new window will open in which you can type the new name of the file.
When you use the Jupyter Notebook dashboard menu to rename Jupyter Notebook files (.ipynb), a new window will open in which you can type the new name of the file.

Delete Existing Jupyter Notebook Files

In addition to opening and creating Jupyter Notebook files (.ipynb) from the dashboard, you can also delete existing Jupyter Notebook files (.ipynb) from the dashboard.

To delete an existing Jupyter Notebook file (.ipynb), click in the checkbox to left of the filename. You will see a red button with a trashcan appear in the top left of the dashboard menu.

Click on that red trashcan button to delete any file that is checked in the list.

When you use the Jupyter Notebook dashboard menu to delete Jupyter Notebook files (.ipynb), you will check the box to left of the filename and select the red Trashcan button that appears.
When you use the Jupyter Notebook dashboard menu to delete Jupyter Notebook files (.ipynb), you will check the box to left of the filename and select the red Trashcan button that appears.

Create Directories in Jupyter Notebook Dashboard

You can also create new directories from the dashboard to manage your Jupyter Notebook files (.ipynb).

In the Jupyter Notebook dashboard menu, select New and choose Folder.

When you use the Jupyter Notebook dashboard menu to create new directories, you will click on the New button and select Folder.
When you use the Jupyter Notebook dashboard menu to create new directories, you will click on the New button and select Folder.

At the top of the new Jupyter Notebook, you will see that the directory is named Untitled.

You can change the name of the directory by clicking in the checkbox to left of the directory name and choosing Rename.

When you use the Jupyter Notebook dashboard menu to rename directories, a new window will open in which you can type the new name of the directory.
When you use the Jupyter Notebook dashboard menu to rename directories, a new window will open in which you can type the new name of the directory.

You can use this same process to rename any folder. You can use the same process to delete directories by selecting the red trashcan, instead of Rename.

Move Jupyter Notebook Files

To move an existing Jupyter Notebook file (.ipynb), it needs to be shutdown first.

To Shutdown a Jupyter Notebook file (.ipynb), click in the checkbox to left of the filename. You will see an orange button named Shutdown appear in the top left of the dashboard menu; click on it to Shutdown any file that is checked in the list.

When you use the Jupyter Notebook dashboard menu to shutdown Jupyter Notebook files (.ipynb), you will check the box to left of the filename and select the orange Shutdown button that appears.
When you use the Jupyter Notebook dashboard menu to shutdown Jupyter Notebook files (.ipynb), you will check the box to left of the filename and select the orange Shutdown button that appears.

After the notebook is shutdown, you can click in the checkbox to left of the filename and select Move. You will be asked to provide the path to directory to which to move the file.

When you use the Jupyter Notebook dashboard menu to move Jupyter Notebook files (.ipynb), you will check the box to left of the filename and select the Move button that appears.
When you use the Jupyter Notebook dashboard menu to move Jupyter Notebook files (.ipynb), you will check the box to left of the filename and select the Move button that appears.

Optional Challenge

  1. Create a new Jupyter Notebook file in your earth-analytics-bootcamp directory.

  2. Rename the new Jupyter Notebook file using your first initial and last name before -markdown (e.g. jpalomino-markdown.ipynb).

  3. Create a new folder called markdown in your earth-analytics-bootcamp directory.

  4. Move your new Jupyter Notebook file (e.g. jpalomino-markdown.ipynb) into the new markdown directory.

Leave a Comment