Table of contents

Access data from local files

You can upload and load local data assets such as CSV files into your Watson Studio Local project. When you add a local data asset to a project, any collaborator in that project can load data from it.

Important: CSV files are assumed to have headers and use a comma as a field separator. When a CSV file is read, an attempt is made to infer the types of the columns. This process is not perfect, and in some cases the inferred type might be wrong; for example, a column of time stamps might be inferred to be a column of strings instead. Malformed CSV files cannot be previewed.
Tip: To avoid a timeout for very large data assets, break the file into smaller pieces, upload them independently, and then concatenate the pieces back together into the big file.

To upload the local data asset:

  1. In your project, go to your Assets page and clickadd data set . Alternatively, you can click Add data set from the project pull-down menu.

    Shows the project icons

  2. Click the Local File tab.

    Shows the Find and Add Data panel

  3. Drag or browse to your local file system to the palette. The file is now added to the project.
RStudio only: In the Files view, you can find the uploaded data files by going to ../datasets from Home.

Load data from a local data asset

To automatically load data from a local data asset into a data frame in a notebook:

  1. Open the notebook and click the Find and Add Data icon ( Shows the Find and Add Data icon) in the toolbar. Only CSV files can be inserted into notebooks, and the first data row is always be read as the header row.
  2. Click the Local tab and select the CSV file to insert.

    Shows the Find and Add Data panel

Restriction: The tab shows only files with type CSV and JSON. Although you can select other file types, such as application or binary, to add, only CSV and JSON are supported. Panda dataframes for JSON files can only be inserted for Python and R.