Today I Learned
Jupyter notebooks are JSON files that can be manipulated easily.
To read them:
import json
= json.load(open(fpath)) nb
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.