Working with CSV Data

Most analyses start from data stored in CSV files.

Rawlytics Notebook provides two ways to import CSV data directly through the user interface.

Once imported, the CSV content becomes available as a dataset in the notebook and can be accessed through the Data API.

Importing a CSV File

To import a CSV file from your computer, use the menu Data → Import from File.

Select a CSV file and Rawlytics Notebook will automatically:

  1. Parse the CSV content.
  2. Create a dataset.
  3. Store it in the sandbox.

The dataset name is derived from the imported file name.

For example:

sales.csv

Becomes:

sales

The dataset can then be accessed using:

var sales = data.item('sales').get();

Pasting CSV Data

For quick imports, CSV content can be pasted directly from the clipboard.

Use the menu Data → Paste Data.

Paste the CSV content and confirm the import.

Rawlytics Notebook creates a dataset automatically and stores it in the sandbox.

By default, pasted data is stored under the dataset name:

clipboard

You can access it using:

var dataset = data.item('clipboard').get();

Because multiple clipboard imports would otherwise reuse the same name, it is recommended to rename the dataset immediately after importing it.

data.rename('clipboard', 'sales');

About the Default Dataset Name

The default name clipboard is intended for temporary imports.

Renaming the dataset makes notebooks easier to read and helps avoid accidental overwrites when importing additional clipboard data.

Parsing CSV Programmatically

Although most CSV files are imported through the interface, CSV data can also be parsed directly from code.

var df = df.csv.parse(csvContent);

The parser converts CSV text into a DataFrame that can be analyzed and transformed.

This approach is useful when CSV content is generated dynamically or retrieved from an external source.

Refer to the DataFrame CSV API for the complete list of available options.

Exporting CSV

Rawlytics Notebook provides built-in export features for tabular datasets.

Exporting a Dataset

To export a dataset stored in the notebook, use the menu Data → Export CSV.

Select the dataset you want to export and Rawlytics Notebook will generate a CSV file that can be downloaded to your computer.

This is the recommended way to export data from a notebook.

Exporting the Output

In some situations, the data displayed in the Output differs from the original dataset.

For example, a cell may generate:

To export the tabular content displayed in an output, use the menu Data → Export Output as CSV.

Rawlytics Notebook exports the data currently displayed in the selected output.

This allows you to quickly save intermediate analysis results without creating an additional dataset.

Next Step

Now that you know how to import external data into a notebook, the next section introduces DataFrames, the primary structure used to explore, transform, and analyze tabular data.