Back to Library

Python Script to Notebook Converter

NotebooksNotebooks●●●AdvancedPythonJupyternotebookdocumentation

Prompt

Convert this Python script into a well-structured Jupyter notebook.

Script purpose: [WHAT THIS SCRIPT DOES]
Target audience: [WHO WILL USE / READ THIS NOTEBOOK]

Rules for conversion:
1. Break the script into logical sections with **markdown header cells**
2. Add a **first cell** with: title, author, date, purpose, and required libraries
3. Add a **parameter cell** near the top with all hardcoded values pulled out as named variables
4. Add **explanatory markdown cells** before any complex code block (1-3 sentences)
5. Add **inline comments** to lines that aren't self-evident
6. Add a **final summary cell** describing what the notebook produced
7. Flag any code that should NOT be run more than once (e.g., one-time data writes) with a ⚠️ markdown warning

Here's the script:
```python
[PASTE PYTHON SCRIPT]
```

Output each cell labeled as: [MARKDOWN] or [CODE] followed by the cell content.
Generate sample demo data

Generic sample context ready for adaptation.

Related Prompts

Notebooks

Jupyter Notebook Explainer

I have a Jupyter notebook I need explained. Break it down cell by cell and give me a plain-English summary. Context: [WHAT THIS NOTEBOOK IS FOR / WHO WROTE IT]...
Notebooks●●IntermediateWorkflow-ready
Notebooks

Data Cleaning Notebook Builder

Write a complete, ready-to-run Jupyter notebook for cleaning and validating my dataset. Dataset description: [DESCRIBE YOUR DATA, e.g. 'CSV of sales transactio...
Notebooks●●●AdvancedSkill-readyWorkflow-ready
Notebooks

Automated Report Generator (Notebook → PDF)

Design a Jupyter notebook that automatically generates a formatted report from data. Report title: [REPORT NAME] Report recipient: [WHO RECEIVES THIS REPORT] F...
Notebooks●●IntermediateSkill-readyWorkflow-ready
Notebooks

EDA (Exploratory Data Analysis) Notebook

Write a complete exploratory data analysis (EDA) Jupyter notebook for my dataset. Dataset: [DATASET NAME OR DESCRIPTION] Columns and types: [LIST COLUMN NAMES ...
Notebooks●●●AdvancedSkill-readyWorkflow-ready
Back to Library