AI tools, scored for your job
Learn AI in 30 days
Home AI Directory Career Paths AI News
Home โ†’ AI News โ†’ Data Science
๐Ÿ”ฌ Data Science

50 AI Prompts for Data Scientists: Copy, Paste, Customize

Don't just ask AI to "clean the data." Get 50 copy-paste AI prompts for data scientists covering cleaning, EDA, modeling, and stakeholder reporting.

September 5, 2026ยท 17 min read
50 AI Prompts for Data Scientists: Copy, Paste, Customize

The short answer

The best AI prompts for data scientists specify the task, context, and desired output format to generate usable code and analysis, not vague advice. Effective prompts provide the AI with business context, data structure, and explicit instructions for tasks like data cleaning, exploratory data analysis, feature engineering, and model interpretation.

Verified against live pricing pagesยท30 Aug 2026ยทHow we test

Generic prompts like “analyze this data” waste time. A data scientist’s value comes from framing a problem and validating the results, but generative AI can dramatically accelerate the mechanical steps in betweenโ€”if you give it the right instructions. Vague requests produce generic, often incorrect, code. Specific, context-rich prompts produce functional scripts, insightful analysis, and clear visualizations.

This guide provides 50 field-tested prompts organized by the data science workflow. We designed them to be copied, pasted, and customized for your specific datasets and problems. ZEKAI reviews tools and workflows independently; our goal is to provide practical resources for working professionals in the AI and data science field. These prompts work best in advanced conversational AI assistants or notebooks designed for data analysis, such as Julius AI, but can be adapted for any powerful Large Language Model (LLM).

1.1% Increase in

Aggregate Productivity Source: stlouisfed.org

Self-reported time savings from generative AI translate to a 1.1% increase in aggregate labor productivity, with workers in computer and mathematics occupations reporting the highest time savings.

Why Generic AI Prompts Fail Data Scientists

Most AI prompt guides offer simple templates with a single {variable}. This approach fails in data science because the context is as important as the command. An effective prompt for a data scientist acts like a project brief for a junior analyst. It must include:

Without this level of detail, the AI is just guessing. It doesn’t know that user_id is a primary key, that revenue is in cents, or that the data is skewed. Specificity is the difference between a working script and a frustrating hallucination.

Prompts for Data Cleaning & Preprocessing

Data preparation often consumes the majority of a project’s time. These prompts accelerate the identification and correction of common data quality issues.

Prompt 01 Comprehensive Data Profile
Act as a data quality analyst. I am providing you with a pandas DataFrame named `df`. Its schema is as follows: `[PASTE SCHEMA OR HEAD() OUTPUT HERE]`.
Your task is to perform a comprehensive data profiling. For each column, provide:
1. Data type.
2. Number and percentage of missing values.
3. Number of unique values (cardinality).
4. For numeric columns: mean, median, standard deviation, min, and max.
5. For categorical columns: a list of unique values and their frequencies.
6. Identify any columns that appear to be incorrectly typed (e.g., dates stored as objects).
Present the output as a markdown table.
Tested on Claude, ChatGPT and Gemini
Prompt 02 Missing Value Imputation Plan
has missing values. Here is the output of
Tested on Claude, ChatGPT and Gemini
Prompt 03 Outlier Detection Script
Generate a Python script that uses the Interquartile Range (IQR) method to identify outliers in the following numeric columns of a pandas DataFrame `df`: `[LIST_OF_NUMERIC_COLUMNS]`.
The script should:
1. Calculate Q1, Q3, and IQR for each specified column.
2. Define the upper and lower bounds (Q1 - 1.5 * IQR, Q3 + 1.5 * IQR).
3. Create a new DataFrame containing only the rows that have outlier values in any of the specified columns.
4. Print the shape of the original DataFrame and the outlier DataFrame.
Tested on Claude, ChatGPT and Gemini
Prompt 04 Data Type Conversion Script
. The following columns need their data types corrected:
-
Tested on Claude, ChatGPT and Gemini
Prompt 05 Duplicate Record Identification
. I want to check for duplicates based on a subset of columns:
Tested on Claude, ChatGPT and Gemini
Prompt 06 Text Normalization Function
that takes a string and performs the following text cleaning steps:
1. Converts the text to lowercase.
2. Removes all punctuation.
3. Removes numerical digits.
4. Removes common English stop words.
5. Stems the remaining words using the Porter Stemmer.
The function should return the cleaned string. Include imports from
Tested on Claude, ChatGPT and Gemini

Prompts for Exploratory Data Analysis (EDA)

Once the data is clean, EDA helps uncover patterns, test hypotheses, and guide feature engineering.

65% of Organizations

Source: mckinsey.com

As of early 2024, 65% of organizations reported regularly using generative AI, nearly doubling from the previous year, signaling a major shift from experimentation to integration.

Prompt 07 Generate Univariate Analysis Plots
, generate a set of Python plots for univariate analysis.
For each numeric column in
Tested on Claude, ChatGPT and Gemini
Prompt 08 Correlation Matrix and Interpretation
Generate Python code to calculate the Pearson correlation matrix for the numeric columns in my pandas DataFrame `df`. The columns are: `[LIST_OF_NUMERIC_COLUMNS]`.
Then, do the following:
1. Create a heatmap of the correlation matrix using seaborn. Annotate the values on the heatmap.
2. Identify and list all pairs of variables with a correlation coefficient greater than 0.7 or less than -0.7.
3. For the top 3 most correlated pairs, provide a one-sentence hypothesis for why they might be correlated.
Tested on Claude, ChatGPT and Gemini
Prompt 09 Bivariate Analysis: Numeric vs. Categorical
.
For each numeric variable, generate a box plot that compares its distribution across the different categories of
Tested on Claude, ChatGPT and Gemini
Prompt 10 Time Series Decomposition
with a datetime index and a column named
Tested on Claude, ChatGPT and Gemini
Prompt 11 Customer Segmentation with K-Means
.
Generate a Python script that:
1. Standardizes these two columns using
Tested on Claude, ChatGPT and Gemini
Prompt 12 Geospatial Data Visualization
with latitude and longitude columns named
Tested on Claude, ChatGPT and Gemini

Prompts for Feature Engineering

Creating the right features is often the key to model performance. AI can help brainstorm and implement feature ideas.

Prompt 13 Brainstorm Feature Ideas
[TARGET_VARIABLE, e.g., 'customer lifetime value']
Tested on Claude, ChatGPT and Gemini
Prompt 14 Create Time-Based Features
. Generate a Python script that creates the following new features from this column:
- Year
- Month
- Day of week (as a number, 0=Monday)
- Day of year
- Week of year
- A binary flag
Tested on Claude, ChatGPT and Gemini
Prompt 15 Generate Interaction Features
Generate Python code to create interaction features for a machine learning model. My pandas DataFrame `df` has the following numeric features: `[COLUMN_A, COLUMN_B, COLUMN_C]`. Create all pairwise interaction features (e.g., A*B, A*C, B*C). Add these new features to the DataFrame.
Tested on Claude, ChatGPT and Gemini
Prompt 16 One-Hot Encode Categorical Features
to one-hot encode the following categorical columns in my DataFrame
Tested on Claude, ChatGPT and Gemini
Prompt 17 Bin Numeric Features
. Generate Python code to create a new column
Tested on Claude, ChatGPT and Gemini
Prompt 18 Create Lag Features for Time Series
is indexed by date and has a target column
Tested on Claude, ChatGPT and Gemini

Prompts for Model Selection & Building

AI can write the boilerplate code for training and evaluating multiple models, letting you focus on interpreting the results.

Prompt 19 Compare Baseline Classification Models
Act as an AutoML specialist. I have a preprocessed dataset with features `X` and a binary target variable `y`. Generate a complete Python script that trains and evaluates three different baseline classification models:
1. Logistic Regression
2. Random Forest Classifier
3. Gradient Boosting Classifier (using LightGBM)
For each model, the script should:
- Use 5-fold cross-validation.
- Calculate and print the mean Accuracy, Precision, Recall, and F1-score.
- Store the results in a pandas DataFrame for easy comparison.
Tested on Claude, ChatGPT and Gemini
Prompt 20 Hyperparameter Tuning with Grid Search
from scikit-learn.
My feature matrix is
Tested on Claude, ChatGPT and Gemini
Prompt 21 Build a Simple Neural Network with Keras
features.
The network architecture should be:
- Input layer with
Tested on Claude, ChatGPT and Gemini
Prompt 22 Set up a Scikit-learn Pipeline
pipeline for a machine learning workflow. The pipeline should consist of the following steps:
1. Impute missing numeric values using
Tested on Claude, ChatGPT and Gemini
Prompt 23 Train a Time Series Forecasting Model (ARIMA)
containing a univariate time series. Generate a Python script using
Tested on Claude, ChatGPT and Gemini
Prompt 24 Build a Recommendation Engine with Surprise
library to build a simple user-item collaborative filtering recommendation model.
Assume I have a pandas DataFrame
Tested on Claude, ChatGPT and Gemini

Prompts for Model Evaluation & Interpretation

A model is useless if you can’t explain its performance and predictions.

Prompt 25 Plot a Confusion Matrix
to compute and plot a confusion matrix. The plot should be clearly labeled with axes titles ('Predicted Label', 'True Label') and the class names
Tested on Claude, ChatGPT and Gemini
Prompt 26 Plot ROC Curve and Calculate AUC
Using `y_test` (true labels) and `y_pred_proba` (predicted probabilities for the positive class from my classifier), generate a Python script to:
1. Calculate the AUC (Area Under the Curve) score.
2. Plot the ROC (Receiver Operating Characteristic) curve.
3. Include a diagonal line representing a random classifier for comparison.
4. Label the plot with the AUC score.
Tested on Claude, ChatGPT and Gemini
Prompt 27 Explain a Prediction with SHAP
. I want to explain a single prediction for a specific instance
Tested on Claude, ChatGPT and Gemini
Prompt 28 Get Global Feature Importance
I have a trained `RandomForestClassifier` model named `model`. My features have the names `[LIST_OF_FEATURE_NAMES]`. Generate Python code to extract the feature importances from the model, match them with their names, and create a horizontal bar plot showing the top 15 most important features.
Tested on Claude, ChatGPT and Gemini
Prompt 29 Perform a Permutation Importance Test
sklearn.inspection.permutation_importance
Tested on Claude, ChatGPT and Gemini
Prompt 30 Plot a Calibration Curve
I want to check if my binary classifier's predicted probabilities are well-calibrated. I have the true labels `y_test` and the predicted probabilities `y_pred_proba`. Generate a Python script using `sklearn.calibration.CalibrationDisplay` to plot a calibration curve for my model.
Tested on Claude, ChatGPT and Gemini

Prompts for Explaining Results & Reporting

Communicating findings to non-technical stakeholders is a critical skill. AI can help draft summaries and create business-friendly visualizations.

Prompt 31 Summarize Model Performance for Executives
[TARGET_VARIABLE, e.g., 'employee attrition']
Tested on Claude, ChatGPT and Gemini
Prompt 32 Describe a Key Insight from a Plot
Below is a Python script that generates a plot. After the script, I will describe the plot. Your task is to write a concise, one-paragraph interpretation of this insight for a business audience. Avoid technical jargon.
`[PASTE PYTHON PLOT SCRIPT]`
The plot shows a bar chart where customers in the 'Tier 1' support category have an average monthly spend of $150, while customers in the 'Tier 3' category have an average spend of $45.
Now, write the business summary.
Tested on Claude, ChatGPT and Gemini
Prompt 33 Create a Business-Focused Visualization
with the results of an A/B test. It has columns
Tested on Claude, ChatGPT and Gemini
Prompt 34 Draft an Email Reporting A/B Test Results
Act as a data analyst. Draft an email to the product team reporting the results of an A/B test for the new "One-Click Checkout" feature.
Key findings:
- Control group conversion rate: 3.5%
- Treatment group (with feature) conversion rate: 4.8%
- The result is statistically significant with a p-value of 0.002.
- The test ran for 14 days with 50,000 users in each group.
Structure the email with a clear subject line, a brief summary of the result, the key numbers, and a recommendation to roll out the feature.
Tested on Claude, ChatGPT and Gemini
Prompt 35 Explain a Technical Concept Simply
Explain the concept of "overfitting" in machine learning as you would to a sales director. Use an analogy. Keep the explanation under 150 words.
Tested on Claude, ChatGPT and Gemini
Prompt 36 Generate a Project README
Generate a markdown template for a data science project README file. The template should include the following sections:
- Project Title
- Business Problem
- Data Source
- Methodology (Data Cleaning, EDA, Modeling)
- Results
- How to Run the Code (Dependencies, Instructions)
- Key Contacts
Tested on Claude, ChatGPT and Gemini

Prompts for MLOps & Production

AI can help with the engineering tasks required to deploy and monitor models. This is where platforms like Azure Machine Learning excel, but AI prompts can script many of the components.

Prompt 37 Write a Dockerfile for a Flask API
(the trained model file)
The Dockerfile should:
1. Start from a
Tested on Claude, ChatGPT and Gemini
Prompt 38 Create a Simple Flask API Endpoint
that accepts POST requests with a JSON payload.
The script must:
1. Load a pre-trained scikit-learn model from a file named
Tested on Claude, ChatGPT and Gemini
Prompt 39 Log Model Metrics with MLflow
Generate a Python script snippet that demonstrates how to use MLflow for experiment tracking. The script should:
1. Start an MLflow run.
2. Log two parameters: `learning_rate` and `n_estimators`.
3. Log three metrics: `accuracy`, `precision`, and `recall`.
4. Log the trained model itself as an artifact.
5. End the run.
Tested on Claude, ChatGPT and Gemini
Prompt 40 Write a GitHub Actions Workflow for CI
branch. The workflow should be named "CI Pipeline" and perform the following jobs:
1. Set up Python 3.9.
2. Install dependencies from
Tested on Claude, ChatGPT and Gemini
Prompt 41 Unit Test for a Data Cleaning Function
def remove_outliers(df, column_name):
Q1 = df[column_name].quantile(0.25)
Q3 = df[column_name].quantile(0.75)
IQR = Q3 - Q1
lower_bound = Q1 - 1.5 * IQR
upper_bound = Q3 + 1.5 * IQR
return df[(df[column_name] >= lower_bound) & (df[column_name] <= upper_bound)]
Tested on Claude, ChatGPT and Gemini
Prompt 42 Monitor for Data Drift
, and I have a new batch of production data in
Tested on Claude, ChatGPT and Gemini

Advanced & Chained Prompts

Combine prompts to execute a multi-step workflow. This is where AI transitions from a simple code generator to an analytical partner.

Prompt 43 Chained: Full EDA Report from a CSV
. First, load it into a pandas DataFrame and run a full data profile. Identify missing values, data types, and basic statistics for each column. Show me the output."
**Prompt 2 (after AI responds):** "Thank you. Based on that profile, generate a Python script to handle the data cleaning. Impute missing
Tested on Claude, ChatGPT and Gemini
Prompt 44 Generate Synthetic Data
: integer, normally distributed around a mean of 40 with a standard deviation of 10.
-
Tested on Claude, ChatGPT and Gemini
Prompt 45 Refactor a Jupyter Notebook into a Class
method that takes model hyperparameters.
- A
Tested on Claude, ChatGPT and Gemini
Prompt 46 Convert Python Script to R
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
df = pd.read_csv('data.csv')
df = df.dropna()
X = df[['feature1', 'feature2']]
y = df['target']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
model = RandomForestClassifier(n_estimators=100)
model.fit(X_train, y_train)
print(model.score(X_test, y_test))
Tested on Claude, ChatGPT and Gemini
Prompt 47 Explain Model Results with Counterfactuals
) for whom the model predicted a high probability of churn (0.92).
Explain this prediction using a counterfactual explanation. In plain English, describe the minimal changes to this customer's features (e.g.,
Tested on Claude, ChatGPT and Gemini
Prompt 48 SQL: Cohort Analysis Query
.
The query should calculate the retention rate of monthly customer cohorts. A customer's cohort is the month of their first purchase. Retention for a given month is the percentage of customers from a cohort who made a purchase in that month.
The output should have three columns:
Tested on Claude, ChatGPT and Gemini
Prompt 49 Create an Interactive Dashboard with Plotly
['date', 'region', 'sales', 'product_category']
Tested on Claude, ChatGPT and Gemini
Prompt 50 Write a Dask script for a large CSV
) that won't fit into pandas memory. The task is to calculate the mean of
Tested on Claude, ChatGPT and Gemini
How do you write a good AI prompt for data analysis?

A good prompt provides clear context. It should tell the AI what persona to adopt (e.g., “act as a data analyst”), define the business goal, provide the data schema (column names and types), give explicit step-by-step instructions, and specify the exact output format you need (e.g., Python code, markdown table, JSON).

Can ChatGPT be used for data science?

Yes, ChatGPT and other large language models are powerful assistants for data science. They excel at generating boilerplate code for cleaning and analysis, debugging scripts, explaining complex concepts, drafting reports, and translating code between languages like Python and R. However, they are tools that require human oversight to ensure the validity and accuracy of the results.

What are the best AI prompts for data cleaning?

The best prompts for data cleaning are highly specific. Instead of “clean the data,” use prompts like: “Generate a Python script to impute missing values in the ‘age’ column with the median,” or “Write code to remove currency symbols and commas from the ‘price’ column and convert it to a float.”

How can AI help with Exploratory Data Analysis (EDA)?

AI can rapidly accelerate EDA by generating code for visualizations. You can ask it to create a grid of histograms for all numeric columns, a correlation heatmap to spot relationships, or box plots to compare distributions across categories. This automates the most time-consuming part of EDA, letting you focus on interpreting the patterns.

Will AI replace data scientists?

No, AI is not expected to replace data scientists, but it is changing the role. AI automates repetitive tasks like writing boilerplate code and initial data profiling, freeing up scientists to focus on higher-value work: problem formulation, experimental design, interpreting complex results, and communicating insights to stakeholders. The job is evolving toward more strategic oversight and less manual coding.

Sources (16)
  1. Goldman Sachs. (2023, April 5). *Generative AI could raise global GDP by 7%*. https://www.goldmansachs.com/insights/articles/generative-ai-could-raise-global-gdp-by-7-percent
  2. Goldman Sachs. (2024, May 13). *AI is showing “very positive” signs of eventually boosting GDP and productivity*. https://www.goldmansachs.com/insights/articles/AI-is-showing-very-positive-signs-of-boosting-gdp
  3. Goldman Sachs. (2025, August 13). *How Will AI Affect the Global Workforce?*. https://www.goldmansachs.com/insights/articles/how-will-ai-affect-the-global-workforce
  4. Goldman Sachs. (2025, July 3). *AI Agents to Boost Productivity and Size of Software Market*. https://www.goldmansachs.com/insights/articles/ai-agents-to-boost-productivity-and-size-of-software-market
  5. Dataversity. (2024, May 1). *The Impact of Generative AI on Data Science*. https://www.dataversity.net/articles/the-impact-of-generative-ai-on-data-science/
  6. Goldman Sachs. (2023, November 7). *AI may start to boost US GDP in 2027*. https://www.goldmansachs.com/insights/articles/ai-may-start-to-boost-us-gdp-in-2027
  7. 365 Data Science. (2026, April 23). *Data Scientist Job Outlook 2026: Trends, Salaries, and Skills*. https://365datascience.com/career-advice/career-guides/data-scientist-job-outlook-2025/
  8. Pragmatic Institute. *AI Prompts for Data Scientists*. https://www.pragmaticinstitute.com/resources/articles/data/ai-prompts-for-data-scientists/
  9. CASRAI. (2026, August 25). *Julius AI for Research Data: A Careful Guide*. https://casrai.org/guides/julius-ai-for-research-data-analysis
  10. McKinsey & Company. (2026, August 25). *The State of AI: Global Survey 2026*. https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai
  11. McKinsey & Company. (2021, December 8). *Global survey: The state of AI in 2021*. https://www.mckinsey.com/capabilities/quantumblack/our-insights/global-survey-the-state-of-ai-in-2021
  12. Medium. (2024, July 17). *Top 20+ Generative AI Prompts for Data Scientists and Analysts*. https://medium.com/@byanalytixlabs/top-20-generative-ai-prompts-for-data-scientists-and-analysts-79c5a691bb8d
  13. McKinsey & Company. (2024, July 22). *What Businesses Can Learn from McKinsey’s 2024 Global Survey on AI Adoption*. https://business.purdue.edu/daniels-insights/posts/2024/global-survey-on-ai-adoption.php
  14. Reddit. (2025, December 12). *Should I pursue Data Science in 2026, or is the field at risk because of AI?*. https://www.reddit.com/r/careerguidance/comments/1pklg0p/should_i_pursue_data_science_in_2026_or_is_the/
  15. Federal Reserve Bank of St. Louis. (2025, February 27). *The Impact of Generative AI on Work Productivity*. https://www.stlouisfed.org/on-the-economy/2025/feb/impact-generative-ai-work-productivity
  16. McKinsey & Company. (2024, May 30). *The state of AI in early 2024: Gen AI adoption spikes and starts to generate value*. https://www.mckinsey.com/capabilities/quantumblack/our-insights/the-state-of-ai-2024

See Zekai first in Google

This article is provided for general information only and does not constitute professional advice. Facts, product details, and figures were accurate to the best of our knowledge at the time of publication and may have changed since. Zekai is an independent publisher and is not affiliated with the companies mentioned. Spotted an error? See our Corrections & Removal Policy.
#AI tools#Data Science#tier-a

The weekly AI briefing for your profession

One weekly email: the AI changes that actually affect your profession โ€” tools, deals, and what to do about them.

Free ยท 1 email/week ยท profession-segmented ยท unsubscribe anytime

More Data Science stories

See Zekai first in Google