All tools
SkillCommunity1.6k

ChatGPT Data Science Prompts

Updated Jul 7, 2026

ChatGPT Data Science Prompts by travistangvh is a curated collection of 60 copy-paste prompts for data science work. Covers writing Python (ML models, AutoML, hyperparameter tuning, visualizations), explaining and optimizing SQL and Python code, EDA, feature engineering, troubleshooting, and explaining models with LIME and SHAP.

View on GitHub

What it does

  • Train classification model prompt

    "Act as a data scientist and code for me. I have a dataset of [describe dataset]. Please build a machine learning model that predicts [target variable]."

  • Explain model with SHAP prompt

    Generates scikit-learn XGBoost model explanation code with SHAP plots.

  • AutoML with TPOT prompt

    "Act as an AutoML bot using TPOT. I am working on a model that predicts [...]. Write Python code to find the best classification model with the highest AUC score on the test set."

  • Suggest A/B testing steps prompt

    "Act as a statistician. [Describe context.] Please design an A/B test including concrete steps on which statistical test I should run."

Files (1)

OVERVIEW.mdprimary · markdown · 2.4 KB
## What it does

ChatGPT Data Science Prompts by travistangvh is a curated collection of 60 copy-paste prompts for data science tasks. The prompts use a consistent "I want you to act as a data scientist and [task]" pattern with clearly marked [squarebrackets] for the parts you fill in.

Categories: Write Python (train classification/time-series models, AutoML with TPOT, tune hyperparameters, visualize with matplotlib, write multithreaded functions, write unit tests, validate pandas DataFrames), Explain Code (Python, SQL, Google Sheets formulas), Optimize Code (improve time complexity, optimize pandas, simplify Python, speed up SQL), Format Code (write documentation, improve readability, format SQL), Translate Code (between DBMS dialects, Python to R, R to Python), Explain Concepts (for five-year-olds, undergrads, professors, business stakeholders, StackOverflow style), Suggest Ideas (edge cases, dataset recommendations, portfolio project ideas, feature engineering, A/B test design, career coaching), Troubleshoot (correct Python/SQL code, debug Power BI), Write SQL (running averages, LeetCode-style data problems), Write Other Code (Google Sheets formulas, R scripts, shell commands, VBA), and Misc (format tables, summarize books/papers).

## Key prompts

- Train a classification model: "Act as a data scientist. I have a dataset of [describe dataset]. Please build a machine learning model that predicts [target variable]."
- Explain model with SHAP: "Act as a data scientist. I have trained a scikit-learn XGBoost model and I would like to explain the output using a series of plots with Shap. Please write the code."
- Suggest feature engineering: "Act as a data scientist and perform feature engineering. I am working on a model that predicts [feature]. There are columns: [describe columns]. Can you suggest features?"

## Install / access

Repository: https://github.com/travistangvh/ChatGPT-Data-Science-Prompts

All 60 prompts are in the README. Replace [squarebrackets] with your specifics and paste into Claude, ChatGPT, or any capable model. A PDF of all prompts with ChatGPT response screenshots is available at chatgpt-datascience-prompt.pdf in the repo.

## When to use

Use this when you need a starting prompt for a data science coding task and don't want to write one from scratch. Particularly fast for model-building, code debugging, and model-explainability tasks. Works in Claude, ChatGPT, Gemini, and any instruction-following model.