Export Data to Jupyter: Datasets, Notebooks and Reviewers

To export data to Jupyter, write your table to a file such as CSV and read it in a notebook. If you instead want to export a notebook, use File → Export Notebook As in JupyterLab. These are two different operations, and mixing them up is the most common source of confusion. This guide covers both, then shows what a supervisor or reviewer needs to reproduce your numbers.
TL;DR
- Exporting data for a notebook means writing a file (CSV, or a binary format when types and metadata matter) and reading it back in the notebook. Always check the round trip.
- Exporting a notebook means converting the
.ipynbinto HTML, PDF, Markdown, LaTeX or a Python script. Each format serves a different reader. - For reviewers, a PDF is not enough. Send the
.ipynb, the input data or a privacy-safe extract, the environment specification and an executed copy. - For patient or other special-category data, treat the export as a governance decision, not a button click.
- PlotStudio AI is agentic analytics for researchers: it exports reproducible Jupyter notebooks and PDF reports from multi-step analyses.
Table of Contents
- Two meanings of “export data to Jupyter”
- Exporting a dataset so a notebook can read it
- Exporting the notebook itself
- What a reviewer or supervisor needs
- Exporting sensitive or clinical data
- Our perspective: portability is not reproducibility
- Where PlotStudio AI fits in this workflow
- A pre-submission checklist
- FAQ
- Sources
Two meanings of “export data to Jupyter”
The phrase hides two jobs.
- Getting a dataset into a form a notebook can read. The data lives in a database, a spreadsheet, a statistics package or another Python session. You write it to a file and load it in the notebook.
- Getting a notebook out of Jupyter. You have an analysis in an
.ipynbfile and need a PDF for a thesis appendix, HTML for a collaborator or a script for version control.
The distinction matters because a Jupyter notebook is a JSON document that holds code, metadata, content and outputs. A CSV file is a separate data artifact. Unless your code embeds or generates it, the notebook does not carry the data with it. Portability (the file opens somewhere else) and reproducibility (someone can regenerate your numbers) are different properties, and we return to that gap below.
Exporting a dataset so a notebook can read it
From a pandas DataFrame
The standard interoperable route is a CSV. Data Carpentry’s ecology lesson demonstrates to_csv and then reading the file back with pd.read_csv:
df.to_csv("data/results.csv", index=False)
check = pd.read_csv("data/results.csv")
The index=False argument matters. Without it, pandas writes the row index as an extra unnamed column, and that column reappears as Unnamed: 0 when you load the file. DataCamp’s walkthrough makes the same point.
From a list or a NumPy array
If the data is not a DataFrame, Data Carpentry for Biologists shows two routes: csv.writer(...).writerows(data) for a list of lists, and numpy.savetxt(..., delimiter=",") for an array. Both produce a file you can load in any notebook.
From R, Stata, SPSS or SAS
The principle is the same: write a plain, documented file from your statistics package and load it in the notebook. Prefer a CSV with a header row, UTF-8 encoding and explicit missing-value codes. If your package has value labels, export a separate data dictionary, because a CSV keeps the codes but not the labels.

When CSV is not enough
CSV is broadly interoperable, but it does not preserve everything. Data Carpentry’s astronomy lesson notes that binary formats such as HDF5 can preserve metadata and are often smaller. Consider a binary format, or at least a data dictionary, when any of these apply:
- Column types matter (dates, categoricals, integer IDs with leading zeros).
- Units or measurement conventions need to travel with the data.
- Missing values are coded in several ways (blank, NA, 999, “unknown”).
- The file is large enough that parsing it repeatedly slows your work.
Keep the exact export code, the units and the missing-value conventions next to the file. A future reader should not have to guess.
Validate with a round trip
Reading the file straight back catches problems before they reach a thesis chapter or a manuscript. After every export, check:
| Check | What it catches |
|---|---|
| Row and column counts match the source | Truncation, dropped rows |
No Unnamed: 0 column |
An index written by mistake |
| Missing-value counts match | NA strings turned into text, or the reverse |
| Dtypes of key columns | Dates read as strings, IDs read as floats |
| File is where the notebook expects it | Wrong working directory |
This takes two minutes and is the cheapest quality control in an analysis.
Exporting the notebook itself
In JupyterLab, open the notebook and choose File → Export Notebook As. The JupyterLab documentation lists AsciiDoc, HTML, LaTeX, Markdown, PDF, reStructuredText, an executable Python script and Reveal.js slides as targets. Availability depends on how nbconvert is installed and configured on your machine. PDF export in particular often needs a LaTeX installation, so a missing option is usually a setup issue, not a bug.
Choose the format by reader:
| Format | Best for | Limitation |
|---|---|---|
.ipynb |
Collaborators who run code; richest record of narrative, code and outputs | Needs Jupyter and the right environment |
| HTML | Quick review in a browser, sharing with non-coders | Static; cannot be rerun |
| Fixed-layout submission, appendices, supervisor reading | Static derivative of the notebook | |
.py script |
Code review and version control | Loses outputs and narrative flow |
| Markdown or LaTeX | Folding results into a manuscript pipeline | Needs manual handling of figures |
No single export replaces the others. If you are headed for a PDF, our guide to Jupyter Notebook to PDF exports for research goes through the practical steps, and the export to Jupyter archive collects related articles.
For conversion outside the interface, Jupyter’s formatting and conversion page points to the utilities for programmatic conversion, which is useful when you export many notebooks at once.
What a reviewer or supervisor needs
A reviewer who asks you to justify a method, or a supervisor who cannot reproduce your numbers, is asking for evidence that the reported results come from the code you describe. A PDF shows what you saw. It does not let anyone regenerate it.
The most defensible package is:
- The original
.ipynb, so the code, narrative and outputs travel together. - The input data, or a privacy-safe extract with a data dictionary.
- An environment specification: package versions, language version, and random seeds.
- An executed copy, so the reader can compare the outputs you reported.
- A PDF or HTML rendering, for people who only want to read.
Run it before you send it
A notebook that opens is not necessarily reproducible. Cells run out of order, a package installed months ago, or a file path on your laptop can all hide a break. Execute the notebook from top to bottom outside the browser. Jupyter’s running guide covers the jupyter execute command, and the execution page describes NBClient for running notebooks from other contexts, including a larger pipeline. nbconvert also documents executing notebooks from the command line. A clean run that surfaces an error is more informative than a notebook whose cells merely show saved outputs.
For a four-step workflow that turns a notebook into a report, see Reproducible Reports in 4 Steps.
Exporting sensitive or clinical data
If your data includes patient records, trial data or GDPR special-category data, exporting to Jupyter is a file-handling and governance decision. Notebooks save code, outputs and rich media together, so a table printed in a cell or a plot with identifiers in its labels is now stored inside the notebook file. Sharing the notebook shares those outputs.
Practical habits:
- Export the minimum. Include only the variables and records the analysis needs, in the de-identified or pseudonymized form your study governance permits.
- Keep identifiers out of outputs. Avoid printing raw rows. Check plot titles, axis labels and error messages.
- Work in an approved environment. Use a local or institutional setup that your data protection officer or information governance team has cleared.
- Clear or review outputs before sharing. Decide deliberately whether the notebook you send contains outputs.
What counts as permitted depends on your institution, your protocol and applicable law. If you are unsure, ask your information governance team or data protection officer before any export, not after.
Our perspective: portability is not reproducibility
Most researchers we talk to treat export as the last step: the analysis is done, now make a file. We think that gets the order backwards. The format of the final artifact should shape how the analysis is done.
When we built PlotStudio AI, we started from the idea that the methodology, code, statistics and charts should stay available for review at every step, not be reconstructed at the end. That is what we mean by agentic analytics for researchers: specialized agents plan an investigation, write and run real code, inspect intermediate results and synthesize findings, while the researcher reviews the plan before execution through Plan Mode. Completed work is preserved as searchable Analysis Pages and can be exported as notebooks and PDF reports, so a collaborator or supervisor can inspect how results were produced.

We do not see this as a replacement for R, Python, Stata, SPSS, SAS, RStudio or Jupyter. Those tools provide the statistical computing. We see PlotStudio AI as an emerging must-have layer in the modern research toolkit alongside them: an agentic layer that plans, executes, inspects, validates and documents complete analyses, then hands the result back in a format your existing stack understands. Jupyter stays the execution and review format.
The habit worth keeping, with or without our software: never send a PDF alone.
— Aymen
Where PlotStudio AI fits in this workflow
If you need to turn tabular data into a reviewable analysis without hand-writing every step, PlotStudio AI connects your data, takes an analytical objective and exports a reproducible notebook and PDF report. Analyses can run locally on your machine, which suits workflows where datasets should not be uploaded to conventional cloud analytics platforms. Your institution still decides what is permitted for your data.
Published plans, as listed on our site:
| Plan | Price |
|---|---|
| Managed Credits | 69.99 USD per month |
| Bring Your Own Key | 39.99 USD per month |
| Bring Your Own Key (annual, academic) | 399.90 USD per year |
| Free Trial | No published price |
You can start on the pricing page, see the academic Bring Your Own Key plan, or read what agentic analytics is. For wider context on coding your own analyses, see Python for statistical analysis for researchers.
A pre-submission checklist
Before a notebook leaves your machine:
- Restart the kernel and run all cells in order.
- Confirm every file path is relative and the data is included or described.
- Record package versions and random seeds.
- Read each output for identifiers or sensitive values.
- Export the formats your reader needs:
.ipynb, plus PDF or HTML for reading. - Reread the exported file, not only the original.
FAQ
How do I export a DataFrame to a file Jupyter can read?
Call df.to_csv("data/results.csv", index=False) and load it with pd.read_csv. Setting index=False stops pandas from adding an extra index column. Read the file back and compare row counts, dtypes and missing values with the original.
How do I export a Jupyter notebook to PDF or HTML?
In JupyterLab, choose File → Export Notebook As and pick the format. Available options depend on your nbconvert configuration, and PDF typically needs extra software installed. If a format is missing, check the installation before changing the notebook.
Is a PDF enough for a reviewer or supervisor?
Usually not. A PDF is a static rendering and does not preserve the executable workflow. Send the .ipynb, the data or a privacy-safe extract, the environment details and an executed copy, with the PDF as a reading aid.
Can I export patient data to a notebook?
Only if your study governance allows it. Export the minimum de-identified or pseudonymized data, keep identifiers out of outputs, and use an approved environment. Ask your information governance team or data protection officer first.
Sources
- Exporting Notebooks, JupyterLab documentation
- Jupyter architecture: the notebook format
- Running the Notebook, Jupyter documentation
- Execution, Jupyter documentation
- Formatting and Conversion, Jupyter documentation
- Executing notebooks, nbconvert documentation
- Combining DataFrames with Pandas, Data Carpentry
- Exporting data from Python, Data Carpentry for Biologists
- Key Points, Foundations of Astronomical Data Science
- How to Save a Pandas DataFrame to CSV, DataCamp