Table of contents

Load data in DSX Desktop

To load data in IBM Data Science Experience (DSX) Desktop:

  1. Download a data file to your file system.

  2. Click the Menu icon (The menu icon) and click Notebooks.

  3. From your Data Assets view, click add data assets and add the file as a data asset so you can use it in notebooks.

    DSX Desktop screencap

    The data assets are stored in:

    /Users/username/Library/Application Support/ibm-dsx-desktop/Notebooks/mynotebooks/assets
    ~/.config/ibm-dsx-desktop/Notebooks/myNotebooks/assets/ or $XDG_CONFIG_HOME/ibm-dsx-desktop/Notebooks/myNotebooks/assets/

To load data from inside a notebook

To access data from a local file, you can load the file from within a notebook, or first load the file into DSX. From your notebook, you add automatically generated code to access the data.

To add a file from your local system from within a notebook:

  1. Open a notebook.
  2. Click the Find and Add Data icon (The find data icon) to open the notebook sidebar.
  3. Click Add a new file to browse to a data file on your system and add it.
  4. Click in an empty code cell in your notebook and then click the Insert to code link below the file and choose how to load the data.

    Shows the notebook sidebar to insert to code.

    Code is generated and added to your notebook for you. The generated code imports any required packages and loads the data into a DataFrame or RDD.

To access a data from inside a notebook without using the notebook sidebar:

  1. Ensure that you loaded the data file to DSX.
  2. Access the data from a notebook cell by prepending ./assets/ to the file name, such as: ./assets/filename.ext

    For example:

    Shows a notebook cell with pd.read_csv("./assets/cars.csv)