Coding · Excerpt

ChatGPT Data Science Prompts

Sixty data science prompts for writing Python, explaining and optimising code, writing SQL and troubleshooting; swap in your details for the square brackets.

Author
Travis Tang(策展;部分条目另署原作者) ↗
Models / tools
ChatGPT
License
未声明 · Excerpt
Original language
en
Purpose
Coding
I want you to 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]`.
Read the full prompt in the author’s original post ↗

Only an excerpt is shown here; full-text republication permission has not been verified.

Attribution required — keep the author’s name and original source when reusing this prompt. Author: Travis Tang(策展;部分条目另署原作者) | Original source ↗

How to use it

VariableWhat to enterExample
数据集描述Dataset description—
要预测的目标变量Target variable—
其他方括号里的内容Anything else in square brackets—

Models / tools: ChatGPT

  1. Pick a prompt by number, replace what's in the square brackets with your own data and goal, and paste it into ChatGPT.

What it can do

This is Travis Tang's set of 60 English prompts for data science, numbered across 11 groups: writing Python, explaining code, optimising code, formatting code, translating code, explaining concepts, suggesting ideas, troubleshooting, writing SQL, writing other code, and miscellaneous. Each one is short, along the lines of "I have a dataset of X; please build a machine learning model that predicts Y." The README says the collection is adapted from Awesome ChatGPT Prompts, and some entries credit their original authors. The author also put the prompts and screenshots of ChatGPT's answers into a PDF. Pick a prompt by number, replace what's in the square brackets with your own data and goal, and paste it into ChatGPT.

Who it is for

Students learning data analysis or data science, new analysts, and developers who want to type less.

Before you use it

The prompts are in English and written for ChatGPT. Some ask the model to write runnable code such as shell scripts, VBA or SQL, so read it before you run it. Data and code you paste in go to the AI service you use. The repo has no licence, so we show only one prompt; see the author's repo for all 60.

Follow the stated license. Do not use the output to replicate someone else’s work or a real person’s likeness.

Based on the author's public posts. Not tested by AI Inspiration World.