Datasets

Upload and manage your data files for analysis in notebooks.

Datasets are the files you analyze in Margin. Upload your data once, then access it from any notebook in your workspace.

Supported Formats

FormatExtensionsBest For
CSV.csvTabular data, spreadsheets
JSON.jsonStructured data, API responses
JSONL.jsonlLine-delimited JSON, logs
Parquet.parquet, .pqLarge datasets, efficient storage

Maximum file size: 50 MB

Uploading Datasets

From the Datasets page:

  1. Click New dataset
  2. Drag and drop your file (or click to browse)
  3. Optionally add a display name and description
  4. Click Upload dataset

Your file uploads to secure cloud storage and appears in your dataset list.

Dataset Details

Click any dataset to view:

  • Name – Display name or filename
  • Description – What the data contains
  • Format – CSV, JSON, JSONL, or Parquet
  • Size – File size in bytes
  • Rows – Row count (for tabular formats)
  • Columns – Column count (for tabular formats)
  • Preview – First 100 rows rendered as a table

Using Datasets in Notebooks

Access your datasets using the margin library:

import margin

# Load a dataset by name
df = margin.load("my-dataset")

# Or by display name
df = margin.load("Sales Q4 2024")

The margin library is pre-installed in the kernel environment.

Common Operations

import margin
import pandas as pd

# Load your data
df = margin.load("customer_data")

# Explore
print(df.shape)  # (rows, columns)
print(df.columns)  # Column names
df.head()  # First 5 rows

# Analyze
df.describe()  # Summary statistics
df.groupby('region').sum()  # Aggregations

Managing Datasets

Renaming

  1. Open the dataset details page
  2. Update the display name
  3. Save changes

Deleting

  1. Open the dataset details page (or use the row actions menu)
  2. Click Delete dataset
  3. Confirm deletion
Deleting a dataset removes it permanently. Notebooks that reference it will fail to load the data.

Sharing Datasets (Pro)

On the Pro plan, you can make datasets public:

  1. Open the dataset details page
  2. Click Share dataset
  3. Toggle Public on
  4. Set a URL slug

Public datasets get:

  • A public URL: marginfordata.com/@username/datasets/slug
  • A 100-row preview table
  • A download button (signed URL)

This enables others to reproduce your analyses end-to-end.

Visibility Levels

LevelWho Can Access
PrivateOnly workspace members
PublicAnyone with the link (Pro only)

Free workspaces see an upgrade prompt when trying to enable public sharing.

Storage Limits

Your workspace has a storage quota:

PlanStorage
FreeLimited
ProMore room
TeamCustom

View your usage in Settings → Billing or check the storage indicator on the Datasets page.

Tips

  1. Use descriptive names – "Q4 2024 Sales by Region" is better than "data.csv"
  2. Add descriptions – Future you will thank present you
  3. Clean before uploading – Remove unnecessary columns to save space
  4. Use Parquet for large files – More efficient storage and faster loading

Next Steps