Loading...
Loading...
Use for Jupyter, JupyterLab, marimo, and Google Colab workflows. Choose this skill when creating, converting, or improving reproducible notebooks for data exploration, analysis, documentation, or teaching.
npx skill4agent add legout/data-agent-skills working-in-notebooks| Instead of... | Use this skill | Because... |
|---|---|---|
| Building a stakeholder-facing dashboard | | Apps are for external users; notebooks are for analysts/developers |
| Creating interactive data explorers for non-technical users | | Streamlit, Panel, Gradio are purpose-built for this |
| Exploratory data analysis patterns | | EDA patterns (profiling, statistical tests) belong there |
| Visualization library selection | | Chart types and library comparison is covered there |
| Production ML feature engineering | | Feature engineering logic is domain-specific |
| Model evaluation and cross-validation | | Model comparison and metrics belong there |
building-data-apps| Question | If yes, consider |
|---|---|
| Need reactive execution (cells auto-update)? | marimo |
| Want pure Python files for version control? | marimo |
| Need specific Jupyter extensions ecosystem? | JupyterLab |
| Using Google Colab features (TPU, shared GPUs)? | Google Colab |
| Want IDE-native experience (IntelliSense, debugger)? | VS Code + Jupyter |
| Converting from existing .ipynb files? | Jupyter → marimo with |
| Teaching beginners (familiarity matters)? | JupyterLab or Colab |
| Tool | Best For | Key Feature | File Format |
|---|---|---|---|
| JupyterLab | Traditional data science, rich extensions | Full IDE experience, 1000+ extensions | |
| marimo | Reproducible notebooks, reactive execution | Python-native, version-control friendly | |
| VS Code + Jupyter | IDE-native notebook experience | IntelliSense, debugging, git integration | |
| Google Colab | Cloud GPUs, easy sharing, collaboration | Free TPU/GPU, zero setup | |
# Cell 1: Environment setup (run first)
# Set random seeds for reproducibility
import numpy as np
import random
np.random.seed(42)
random.seed(42)
# For torch users:
# import torch
# torch.manual_seed(42)requirements.txtenvironment.yml# requirements.txt
pandas==2.1.0
numpy==1.24.0
matplotlib==3.7.0# With uv
uv pip freeze > requirements.txt
# With poetry
poetry export -f requirements.txt > requirements.txt# Title: Clear project/question description
## Setup
Imports and configuration
## Data Loading
Load and validate data
## Analysis
- Subsection per question/hypothesis
- Clear markdown explanations
- Visualizations with interpretations
## Conclusions
Key findings and next steps# ✅ Use environment variables
import os
api_key = os.environ.get("OPENAI_API_KEY")
# ❌ Never do this
api_key = "sk-abc123..."# Install nbstripout
pip install nbstripout
nbstripout --install
# Or use pre-commit
pip install pre-commit
pre-commit install.py../analyzing-data/references/notebook-testing.mdreferences/jupyter-guide.mdreferences/marimo-guide.mdreferences/reproducibility-patterns.md../analyzing-data/references/notebook-testing.md../analyzing-data/references/sharing-publishing.md# Start JupyterLab
jupyter lab
# Convert notebook
jupyter nbconvert notebook.ipynb --to html
jupyter nbconvert notebook.ipynb --to script
# List kernels
jupyter kernelspec list
# Install kernel for virtual environment
python -m ipykernel install --user --name=myenv# Create/edit a notebook
marimo edit notebook.py
# Run as app (read-only)
marimo run notebook.py
# Convert from Jupyter
marimo convert notebook.ipynb -o notebook.py
# Export to HTML
marimo export html notebook.py -o notebook.html# Check installed versions
import pandas as pd
import numpy as np
print(f"pandas: {pd.__version__}")
print(f"numpy: {np.__version__}")| Skill | Relationship | When to use |
|---|---|---|
| Complementary | EDA patterns, profiling, statistical tests—use with notebooks |
| Distinct boundary | Building stakeholder-facing dashboards—not this skill |
| Complementary | Cross-validation, metrics, experiment tracking |
| Complementary | Feature engineering patterns and transformations |
data-science-notebooksdependsOnbuilding-data-apps@skill