How to run exploratory data analysis with Claude + Jupyter
Quand l'utiliser : You've got a new dataset and want to poke at it without writing boilerplate cells yourself.
Prérequis
- 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
Déroulement
-
Load the notebook and dataUse use_notebook to open analysis.ipynb. Insert a cell that loads ./data/events.parquet into a DataFrame named df.✓ Copié→ Cell executes; df.head() preview returned
-
Iterate on analysisWhat does the distribution of event_type look like? Plot it, show me the image.✓ Copié→ 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.✓ Copié→ Notebook that reproduces end-to-end
Résultat : A publishable notebook with narrative, charts, and verified reproducibility.
Pièges
- 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