Datalore 2024.2 Help

Add files

The procedures in this article explain how to upload files into your workspaces and notebooks.

Upload files into a workspace from Home page

The procedure adds files from your local file system to a selected workspace using the Home page interface.

  1. On the Home page, select the workspace to which you want to add files.

  2. In the selected workspace, select Workspace files from the left-hand menu.

    Workspace files menu
  3. Click the arrow next to the Import button in the upper right corner.

  4. Use one of the options:

    • To upload individual files, select Upload files and use the file browser to select files to upload.

    • To upload a folder, select Upload folder and use the file browser to select a folder to upload.

    Uploading files or folder

Upload files as notebook attachments

The procedure adds files from your local file system or a URL to the attached data of a selected notebook. You can upload files:

  • As notebook files: they will be stored in the notebook attachments (/data/notebook_files directory).

  • As workspace files: they will be stored in the respective workspace attachments (/data/workspace_files directory)

  • Into an attached cloud storage: they will be stored in the cloud storage (/data/[cloud_storage_name] directory)

  1. Open the Attached data from the left-hand sidebar of the editor.

  2. Click the arrow next to the Upload files button for the required attached data source.

  3. Use one of the options:

    • To upload individual files, select Upload files and use the file browser to select files to upload.

    • To upload a folder, select Upload folder and use the file browser to select a folder to upload.

    Uploading files or folder

Create files for notebook attachments

The procedure creates text-based files (CSV, TSV, and other formats) and attaches them to an attached data source of a notebook.

  1. Open the Attached data tool from the left-hand sidebar of the editor.

  2. Click the attached data source where you want to create a file.

  3. Click the New file icon on the toolbar in the upper left corner of the list.

    Alternatively, you can right-click anywhere in the list area and select New file from the popup menu. The new file is added to the list.

    New file icon in Notebook files
  4. Provide a name for the new file and specify its extension. You can create any text-based file (CSV, TSV, and other formats).

  5. To open and edie the file in the text editor, double-click it. The changes that you make are saved automatically every ten seconds or on the explicit ⌘+S action.

Quick file upload

This is the quickest way to add a file to your notebook and start using it in the code:

  1. Drag a file from your file system and drop it anywhere in the editor.

  2. To refer to the file in your code, use the file name.

    For example, the code below uses a file called 'libraries_by_python_version.csv'.

    libraries = pd.read_csv('libraries_by_python_version.csv') libraries

Results and further actions

  • If added to a specific notebook, the new files are only available inside this notebook.

  • If added to a workspace other than the default Home, the new files are available inside all notebooks residing in this workspace. be attached to any notebook from this workspace.

  • If added to the default Home workspace, the new files can be available inside any notebook residing in this workspace once attached to it.

Keywords

upload files, attach files, add files, data sources, data, data files, notebook attachments

Last modified: 17 May 2024