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
| Format | Extensions | Best For |
|---|---|---|
| CSV | .csv | Tabular data, spreadsheets |
| JSON | .json | Structured data, API responses |
| JSONL | .jsonl | Line-delimited JSON, logs |
| Parquet | .parquet, .pq | Large datasets, efficient storage |
Maximum file size: 50 MB
Uploading Datasets
From the Datasets page:
- Click New dataset
- Drag and drop your file (or click to browse)
- Optionally add a display name and description
- 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
- Open the dataset details page
- Update the display name
- Save changes
Deleting
- Open the dataset details page (or use the row actions menu)
- Click Delete dataset
- 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:
- Open the dataset details page
- Click Share dataset
- Toggle Public on
- 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
| Level | Who Can Access |
|---|---|
| Private | Only workspace members |
| Public | Anyone 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:
| Plan | Storage |
|---|---|
| Free | Limited |
| Pro | More room |
| Team | Custom |
View your usage in Settings → Billing or check the storage indicator on the Datasets page.
Tips
- Use descriptive names – "Q4 2024 Sales by Region" is better than "data.csv"
- Add descriptions – Future you will thank present you
- Clean before uploading – Remove unnecessary columns to save space
- Use Parquet for large files – More efficient storage and faster loading
Next Steps
- Create a notebook to analyze your data
- Build a brief to share your findings
- Learn about sharing and public datasets