January 15, 2020
Jupyter notebooks are JSON files that can be manipulated easily.
To read them:
import json
nb = json.load(open(fpath))
To clear outputs
for cell in nb['cell']:
if cell.cell_type=='code': cell['outputs']=[]
All normal json and easy to work with when needed. nbdev has lots of functions and tools to make most of this easier too.