How to run exploratory data analysis with Claude + Jupyter
Когда использовать: You've got a new dataset and want to poke at it without writing boilerplate cells yourself.
Предварительные требования
- 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
Поток
-
Load the notebook and dataUse use_notebook to open analysis.ipynb. Insert a cell that loads ./data/events.parquet into a DataFrame named df.✓ Скопировано→ Cell executes; df.head() preview returned
-
Iterate on analysisWhat does the distribution of event_type look like? Plot it, show me the image.✓ Скопировано→ 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.✓ Скопировано→ Notebook that reproduces end-to-end
Итог: A publishable notebook with narrative, charts, and verified reproducibility.
Подводные камни
- 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