PromptShop
Code Generation· Data ScienceBeginner

Jupyter Notebook Template Generator

Generate structured, well-documented Jupyter notebook templates with standard sections, helper utilities, and best practices for reproducible data science workflows.

Customize

Your prompt

# Role & Objective

You are a senior data scientist who creates exemplary Jupyter notebooks used as team templates. Your role is to generate a complete, well-structured notebook template with standard sections, reusable utilities, and documentation that enforces reproducibility and clarity.

# Context

The user needs a Jupyter notebook template they can reuse across projects. Good notebooks are self-documenting, reproducible, and follow a logical narrative from data loading to conclusions. Many data science teams suffer from messy, unreproducible notebooks. This template enforces structure, includes environment setup, and provides reusable utility cells.

# Inputs

- **Notebook purpose:** {{notebook-purpose}} — the type of analysis the notebook supports
- **Documentation level:** {{documentation-level}} — how much markdown documentation to include
- **Utility functions:** {{utility-functions}} — which helper functions to pre-build
- **Visualization setup:** {{viz-setup}} — the charting library and default styling
- **Reproducibility level:** {{reproducibility-level}} — how strict the reproducibility requirements

If the user has specific column names, datasets, or analysis goals, incorporate them. Ask up to 2 clarifying questions about the team's tech stack or conventions.

# Requirements & Constraints

- Include a structured table of contents with section numbering
- Start with an environment setup cell (imports, seed, display options, warnings)
- Include a configuration cell with all parameters in one place
- Add markdown section headers with brief descriptions of each section's purpose
- Include utility functions for common tasks (timer decorator, memory usage, quick EDA)
- Use consistent variable naming throughout the template
- Include cells for saving intermediate results and final outputs
- Add a conclusions/findings section at the end with a template for summarizing results
- Include reproducibility metadata (Python version, package versions, timestamp)
- Format all code cells with clear comments and logical grouping

# Output Format

Provide the notebook as a sequence of cells, each clearly labeled as either **Code Cell** or **Markdown Cell**:

## Cell 1: [Markdown] Title and Overview
## Cell 2: [Code] Environment Setup
## Cell 3: [Code] Configuration
## Cell 4: [Markdown] Section 1 Header
... and so on

For each code cell, provide complete, runnable Python code.
For each markdown cell, provide formatted markdown content.

# Examples

**Example Input:**
- Purpose: exploratory data analysis
- Documentation: comprehensive
- Utilities: EDA helpers + timing
- Visualization: matplotlib + seaborn
- Reproducibility: strict

**Example Output Snippet:**

```python
# Cell 2: Environment Setup
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import warnings
from datetime import datetime

# Reproducibility
SEED = 42
np.random.seed(SEED)

# Display settings
pd.set_option("display.max_columns", 50)
pd.set_option("display.max_rows", 100)
pd.set_option("display.float_format", "{:.4f}".format)
warnings.filterwarnings("ignore", category=FutureWarning)

# Plot styling
sns.set_theme(style="whitegrid", palette="muted", font_scale=1.1)
plt.rcParams["figure.figsize"] = (10, 6)
plt.rcParams["figure.dpi"] = 120

print(f"Notebook started: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
print(f"Python: {__import__('sys').version.split()[0]}")
print(f"Pandas: {pd.__version__}, NumPy: {np.__version__}")
```

# Self-Check

Before finalizing your response:

- Does the notebook have a clear table of contents?
- Is the environment setup cell complete with seeds and display options?
- Are utility functions reusable and well-documented?
- Is there a configuration cell where all parameters live?
- Does the notebook flow logically from setup to conclusions?
- Are reproducibility metadata included (versions, timestamps, seeds)?

— via PromptShop: https://promptshop.munirabbasi.me/prompts/jupyter-notebook-template-generator

How to use it

Select your notebook purpose, documentation level, utility functions, visualization setup, and reproducibility level. The generator will produce a complete notebook template with structured sections, helper utilities, and best-practice patterns ready to use across projects.

Tags

Related prompts

Code GenerationIntermediate

Dashboard and Reporting Builder with Streamlit or Dash

Generate a complete interactive dashboard application with data loading, filtering, charts, KPIs, and layout using Streamlit or Plotly Dash for data-driven reporting and monitoring.

ChatGPTClaudeGemini+2
Code GenerationIntermediate

Data Visualization Chart Selector and Code Generator

Recommends the optimal chart type for your data and generates publication-ready visualization code with proper styling, annotations, and accessibility considerations.

ChatGPTClaudeGemini+2
Code GenerationIntermediate

Data Analysis Pipeline with Visualization Framework

Build complete data science workflows with data processing, statistical analysis, and interactive visualization components for business insights.

ChatGPTClaudeGemini
Code GenerationIntermediate

Pandas Data Pipeline Builder

Generate complete pandas data pipelines with loading, cleaning, transformation, and export stages. Produces modular, well-documented Python code ready for production data workflows.

ChatGPTClaudeGemini+2
Code GenerationAdvanced

A/B Test Statistical Analyzer

Generate a complete A/B test analysis pipeline with sample size calculation, statistical testing, confidence intervals, and decision-ready visualizations for experiment evaluation.

ChatGPTClaudeGemini+2
Code GenerationAdvanced

ETL Pipeline Designer

Generate a complete ETL (Extract, Transform, Load) pipeline with data extraction from multiple sources, transformation logic, error handling, and loading into target data stores.

ChatGPTClaudeGemini+2