Data Analysis — Python Script for Analysing a Dataset
Generate a complete Python data analysis script for any dataset. Covers data cleaning, exploratory analysis, visualisations, and key insights.
Fill in your details
Fill in the fields below. The preview on the right updates live as you type.
Live Preview
Act as a senior data scientist who writes clean, well-documented Python code for data analysis. Create a complete analysis script for the following dataset. **Dataset Description:** [DESCRIBE YOUR DATA — what it contains, how many rows/columns approximately, where it comes from] **File Format:** [CSV / Excel / JSON / SQL / Parquet / API] **Key Columns:** [LIST THE MOST IMPORTANT COLUMNS AND THEIR DATA TYPES — e.g. "date (datetime), user_id (int), revenue (float), country (string)"] **Analysis Goal:** [WHAT BUSINESS QUESTION ARE YOU TRYING TO ANSWER?] **Specific Analysis Needed:** [e.g. "Find which products have declining sales", "Identify customer churn patterns", "Correlate marketing spend with revenue"] Generate a Python script that: 1. **Data Loading** — Load the dataset with pandas, handle file path as a variable 2. **Data Cleaning:** - Check for and handle missing values (with strategy for each column type) - Remove duplicates - Fix data types (especially dates) - Handle outliers (flag, cap, or remove — with justification) 3. **Exploratory Data Analysis:** - Summary statistics for numeric columns - Distribution checks - Time-series trend if date column present - Correlation matrix 4. **Core Analysis** — Answer the stated business question with appropriate methods 5. **Visualisations** — 3–4 charts using matplotlib/seaborn with clear titles, labels, and colour choices 6. **Key Findings** — Print a summary of 5 insights from the analysis 7. **Next Steps** — Comment block suggesting further analysis Include all import statements. Add a `requirements.txt` block at the top as a comment.
3 fields remaining
How to use this prompt
- 1Fill in your details in the form above — the prompt preview updates as you type.
- 2Check the live preview to confirm all fields are filled correctly.
- 3Click "Copy prompt" and paste directly into ChatGPT.
Related prompts
Coding Assistant — Build a Feature from a Plain-English Description
Turn a plain-English feature description into working code with clear implementation steps, edge case handling, and tests.
Use promptCode Review & Refactor — Improve Existing Code
Get a thorough code review of existing code with specific refactoring suggestions, bug identification, and performance improvements.
Use promptResume Builder — Software Engineer with 8+ Years of Experience
Generate a polished, ATS-optimised resume for a senior software engineer with 8+ years of experience. Covers summary, skills, experience bullets, and impact metrics.
Use promptCover Letter — Any Role, Any Industry
Write a compelling, personalised cover letter for any job application. Matches your experience to the job description and strikes a professional yet human tone.
Use prompt