How to run exploratory data analysis with Claude + Jupyter
Wann einsetzen: You've got a new dataset and want to poke at it without writing boilerplate cells yourself.
Voraussetzungen
- Running JupyterLab with token auth — jupyter lab --no-browser; copy the token from the URL
- JUPYTER_URL + JUPYTER_TOKEN env vars — Set to your lab URL and token
Ablauf
-
Load the notebook and dataUse use_notebook to open analysis.ipynb. Insert a cell that loads ./data/events.parquet into a DataFrame named df.✓ Kopiert→ Cell executes; df.head() preview returned
-
Iterate on analysisWhat does the distribution of event_type look like? Plot it, show me the image.✓ Kopiert→ Histogram image rendered in chat
-
Save a clean notebookClean the notebook: delete error cells, add markdown headers, restart-run-all to verify it runs top-to-bottom.✓ Kopiert→ Notebook that reproduces end-to-end
Ergebnis: A publishable notebook with narrative, charts, and verified reproducibility.
Fallstricke
- Kernel state drifts from notebook cell order — Use notebook_run-all-cells after edits to catch hidden-state bugs
- Data files aren't visible to the kernel — Kernel's CWD is the notebook's dir, not where you started Jupyter — use absolute paths