You can export your Jupyter notebooks in a way that keeps the code intact, but scrubs the outputs in conformance with privacy rules.
An exported notebook indicates inline where content has been removed.
In general, we filter out:
html
, stdout
, and stderr
We do not filter out:
The resulting notebook is fully functional in terms of the code. The recipient of the notebook can run all the code and obtain their own results, assuming they have legal access to the data and the required permissions. This also means that a "scrubbed" notebook can be submitted for publication as part of your research.
In your Jupyter environment, follow these steps to export a Jupyter notebook. Differences in the process if you are using WorkSpaces Secure Browser are noted.
From the left navigation window in your Jupyter environment, right-click the name of the notebook you want to export and select Export Notebook.
Note: Not all environments support the export of notebooks. If Export Notebook does not appear in the menu when you right-click the name of the notebook, that means you will not be able to proceed.
A dialog box will display, indicating the email address to which the download link for the notebook is being sent.
Open the email and click the download link to begin the export.
When the export completes, locate the exported notebook in your downloads folder. The notebook has the same name as the original, with "-scrubbed" appended to it.
Open the file in your local environment to view it.