banner



How To Upload A File In Jupyter Notebook

Calculation data to the JupyterHub¶

This department covers how to add data to your JupyterHub either from the internet or from your ain machine. To learn how to share data that is already on your JupyterHub, see Share data with your users.

Note

When you add information using the methods on this folio, you volition only add it to your user directory. This is non a place that is accessible to others. For information on sharing this data with users on the JupyterHub, come across Share data with your users.

Adding information from your local machine¶

The easiest way to add together data to your JupyterHub is to use the "Upload" user interface. To do so, follow these steps:

  1. First, navigate to the Jupyter Notebook interface habitation page. You can practice this past going to the URL <my-hub-url>/user/<my-username>/tree .

  2. Click the "Upload" button to open the file chooser window.

    The upload button in Jupyter.
  3. Choose the file yous wish to upload. You may select multiple files if y'all wish.

  4. Click "Upload" for each file that you lot wish to upload.

    Multiple file upload buttons.
  5. Look for the progress bar to finish for each file. These files volition at present be on your JupyterHub, your abode user'southward dwelling directory.

To learn how to share this data with new users on the JupyterHub, run across Share data with your users.

Downloading data from the command line¶

If the data of interest is on the net, you may also use lawmaking in society to download it to your JupyterHub. There are several ways of doing this, so we'll cover the simplest approach using the unix tool wget .

  1. Log in to your JupyterHub and open a concluding window.

    New terminal button.
  2. Use wget to download the file to your current directory in the terminal.

Case: Downloading the gapminder dataset.¶

In this example we'll download the gapminder dataset, which contains information about state GDP and alive expectancy over time. You can download it from your browser at this link.

  1. Log in to your JupyterHub and open up a last window.

    New terminal button.
  2. Use wget to download the gapminder dataset to your current directory in the terminal.

                        wget https://swcarpentry.github.io/python-novice-gapminder/files/python-novice-gapminder-information.aught                  
  3. This is a zip file, then we'll need to download a unix tool chosen "unzip" in social club to unzip it.

  4. Finally, unzip the file:

                        unzip python-novice-gapminder-information.zip                  
  5. Confirm that your data was unzipped. It could be in a binder called information/ .

To learn how to share this data with new users on the JupyterHub, see Share information with your users.

Source: https://tljh.jupyter.org/en/latest/howto/content/add-data.html

Posted by: lewiskingince.blogspot.com

0 Response to "How To Upload A File In Jupyter Notebook"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel