## 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.