AI tools, scored for your job
Get paid to train AI
Home AI Directory Career Paths AI News
Home โ†’ AI News โ†’ Data Science
๐Ÿ”ฌ Data Science

18 Best ChatGPT Prompts for Data Analysis

Discover high-performing ChatGPT prompts for data analysis. Clean datasets, write optimized SQL queries, perform EDA, and generate business insights fast.

November 2, 2026ยท 9 min read
18 Best ChatGPT Prompts for Data Analysis

Transform raw datasets into actionable insights with structured AI prompts designed for modern data workflows. This collection helps data analysts, data scientists, and business intelligence professionals automate repetitive data prep, write cleaner analytical code, and extract meaningful business stories. Copy and adapt these prompts directly into your AI workspace to accelerate your analytical pipelines.

Data Cleaning & Preprocessing Prompts

Prepare raw, messy datasets for analysis by establishing systematic cleaning pipelines and handling missing or anomalous data.

Fill in once, every prompt updatesType your details; all prompts on this page update before you copy.
Prompt 01
Data Quality Audit & Cleaning Plan
Act as a Lead Data Engineer. I have a raw dataset containing [DATASET_DESCRIPTION] provided in [DATA_FORMAT] format. The key columns are [COLUMNS], and the primary analytical goal is [BUSINESS_GOAL]. Analyze this schema to create a comprehensive data quality audit plan. Identify potential issues such as missing fields, formatting inconsistencies, duplicate values, and out-of-range records. Format your response as a structured markdown document containing: 1) A summary table of potential data quality risks, 2) A prioritized cleaning checklist, and 3) A reusable Python (Pandas) code block demonstrating how to execute the cleaning operations safely.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 02
Missing Value Imputation Strategy
Act as a Senior Data Scientist. I am processing a dataset of [DATASET_DESCRIPTION] where several columns suffer from missing values, specifically [COLUMNS_WITH_MISSING_DATA]. The intended downstream task is [ANALYTICAL_TASK_OR_MODEL]. Evaluate the potential mechanisms of missingness (MCAR, MAR, MNAR) based on the context provided. Propose an appropriate imputation strategy for each column, balancing statistical integrity with implementation complexity. Format your output as: 1) A clear rationale explaining why each technique (e.g., mean/median, KNN, MICE, or indicator flags) was chosen for each variable, and 2) Ready-to-run Python code using Pandas and Scikit-Learn to execute the recommended imputations.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 03
Outlier Detection & Handling Strategy
Act as an Applied Statistician. I am examining quantitative variables including [NUMERICAL_COLUMNS] within a dataset describing [DATASET_DESCRIPTION]. I need to detect and address extreme values that might distort statistical analysis or predictive models. Formulate a robust outlier detection approach comparing Z-score, Interquartile Range (IQR), and Isolation Forest methods suitable for [BUSINESS_GOAL]. Output your advice as follows: 1) A theoretical comparison explaining when to use each method, 2) Threshold recommendations for flagging outliers, and 3) Python code using Pandas and Scikit-Learn that flags, visualizes, and optionally caps or removes these extreme values.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 04
Feature Encoding & Preprocessing Pipeline
Act as a Machine Learning Engineer. I need to transform raw categorical and numeric features in a dataset about [DATASET_DESCRIPTION]. The target variable is [TARGET_VARIABLE], and the predictor features include categorical variables [CATEGORICAL_COLUMNS] and numeric variables [NUMERIC_COLUMNS]. Design a preprocessing pipeline tailored to [ALGORITHM_OR_ANALYSIS_TYPE]. Deliver your output as: 1) A feature transformation decision matrix explaining the rationale for each encoding and scaling technique, and 2) Python code using Scikit-Learn's ColumnTransformer and Pipeline modules to standardize the pipeline.
Run it with: or any assistant: ChatGPT, Claude, Gemini

Exploratory Data Analysis & Statistical Modeling

Uncover hidden patterns, evaluate statistical relationships, and validate hypotheses across complex datasets.

Prompt 05
Automated EDA Plan & Execution Guide
Act as a Principal Data Analyst. I am beginning an Exploratory Data Analysis (EDA) on a dataset containing [DATASET_DESCRIPTION] with [NUMBER_OF_ROWS] rows and variables including [KEY_VARIABLES]. My core business objective is to understand [BUSINESS_QUESTION]. Provide an end-to-end EDA execution plan divided into Univariate, Bivariate, and Multivariate analysis steps. For each phase, describe the specific statistical metrics to compute and charts to plot. Include a complete Python script using Pandas, Seaborn, and Matplotlib to generate these plots and print descriptive statistical summaries.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 06
Correlation & Driver Discovery
Act as a Quantitative Researcher. I want to identify which independent variables in [COLUMN_NAMES] have the strongest correlation or influence on [TARGET_METRIC]. The underlying dataset covers [DATASET_CONTEXT]. Outline a analytical approach to test linear and non-linear relationships, addressing potential collinearity issues among variables. Provide: 1) A step-by-step methodology explaining Pearson, Spearman, and Mutual Information metrics, and 2) Python code that generates a annotated correlation heatmap and calculates Feature Importance scores using a Random Forest baseline model.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 07
Statistical Hypothesis Testing Framework
Act as a Senior Biostatistician and Data Analyst. I need to conduct a formal hypothesis test to determine if [VARIABLE_A] has a statistically significant effect on [VARIABLE_B]. The data consists of [DATA_TYPE_AND_SAMPLE_SIZE]. Define the Null Hypothesis (H0) and Alternative Hypothesis (H1). Select the most appropriate statistical test (e.g., T-Test, ANOVA, Chi-Square, Mann-Whitney U) based on data characteristics. Output: 1) Assumption verification steps (normality, homoscedasticity), 2) Interpretation rules for p-values and effect size (Cohen's d or Cramer's V), and 3) Python code using SciPy.Stats to perform the analysis.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 08
Distribution & Skewness Analysis
Act as a Data Scientist. I am evaluating continuous features [CONTINUOUS_COLUMNS] in a dataset representing [DATASET_DESCRIPTION]. I suspect non-normal distributions and high skewness, which could skew downstream modeling. Guide me through measuring skewness, kurtosis, and applying mathematical transformations (e.g., Log, Square Root, Box-Cox, Yeo-Johnson). Output your response in two parts: 1) A decision guide on choosing the right transformation method for different skewness levels, and 2) Python code utilizing Scikit-Learn and SciPy to test, transform, and visualize pre/post distributions.
Run it with: or any assistant: ChatGPT, Claude, Gemini

SQL & Python Code Generation for Analytics

Generate optimized database queries, write efficient data transformation scripts, and build interactive charts.

Prompt 09
Complex SQL Query & CTE Generation
Act as a Staff SQL Specialist. I need to write an optimized SQL query for [DATABASE_TYPE, e.g., PostgreSQL/BigQuery/Snowflake]. My database has tables [TABLE_NAMES_AND_SCHEMAS]. The goal is to calculate [KEY_METRIC_OR_KPI] grouped by [DIMENSIONS] over the time period [TIME_FRAME]. The query must filter for [FILTER_CONDITIONS] and use Common Table Expressions (CTEs) for clarity. Provide: 1) The optimized SQL query with clear comments explaining window functions or joins, 2) An explanation of index recommendations for performance, and 3) Sample output format.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 10
Pandas Data Aggregation & Reshaping Script
Act as a Senior Python Developer specializing in Data Analysis. I have a DataFrame `df` with columns [COLUMN_LIST]. I need to perform complex data manipulation: aggregate [METRIC_COLUMNS] by [GROUPING_COLUMNS], pivot the table on [PIVOT_COLUMN], and compute rolling averages over a [WINDOW_SIZE] period. Provide a clean, vectorized, production-ready Pandas code snippet without using explicit loops. Include inline annotations explaining how handling multi-index columns and reindexing is managed for downstream visualization.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 11
Interactive Visualization Code Generation
Act as a Data Visualization Expert. I want to build an interactive dashboard visual using [Plotly / Bokeh / Altair] in Python. The dataset contains [DATASET_SUMMARY] with key metrics [METRICS] across dimensions [DIMENSIONS]. Create code for a multi-panel plot that includes hover tooltips, customizable color palettes tailored for executive presentations, and proper dynamic axis labels. Provide the complete executable Python script alongside design tips for conveying clear insights to non-technical stakeholders.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 12
Time Series Aggregation & Resampling
Act as a Time Series Data Analyst. I have a dataset of timestamped transactions recorded at [ORIGINAL_FREQUENCY, e.g., raw seconds] frequency, containing columns [TIME_STAMP_COLUMN, METRIC_COLUMNS]. I need to resample this data to [TARGET_FREQUENCY, e.g., daily/weekly], forward-fill missing dates, and compute metrics such as period-over-period growth rate and cumulative sums. Provide efficient Python code using Pandas datetime indexing, along with visual plotting commands via Matplotlib to display trend components.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 13
Automated Feature Engineering Script
Act as a Machine Learning Data Analyst. Given a transactional dataset with raw fields [LIST_OF_RAW_FIELDS], I need to engineer new domain-specific features to improve model performance for predicting [TARGET_OUTCOME]. Suggest at least 5 creative engineered features (e.g., aggregation ratios, temporal features, recency metrics). Output your response as: 1) Strategic explanations of why each feature is predictive, and 2) Modular Python code that creates these features safely without introducing data leakage.
Run it with: or any assistant: ChatGPT, Claude, Gemini

Business Insights & Data Storytelling

Translate complex analytical results into compelling narratives, executive summaries, and tactical recommendations.

Prompt 14
Executive Data Summary & Insights Synthesis
Act as a VP of Business Analytics. I have performed analysis on [TOPIC_OR_PROJECT] and gathered the following statistical metrics: [KEY_FINDINGS_AND_NUMBERS]. Translate these raw analytical insights into an executive summary for [TARGET_AUDIENCE, e.g., CEO/CFO]. Structure the report with: 1) High-level TL;DR bullet points, 2) Key business takeaways broken down by functional impact, 3) Critical risks or anomalous metrics, and 4) Three strategic, prioritized recommendations based on the findings.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 15
Customer Cohort & Retention Rate Analysis
Act as a Retention Analytics Specialist. I have calculated monthly cohort retention rates for user signups over [TIME_PERIOD]. The dataset output shows [RETENTION_DATA_SUMMARY_OR_TABLE]. Help me analyze these cohort metrics to evaluate user decay patterns. Deliver: 1) An analytical summary explaining where drop-offs spike, 2) Identification of healthy vs. underperforming cohorts, 3) A structured hypothesis for retention loss causes, and 4) A clear framework for presenting these retention insights to product teams.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 16
Metric Drop Root Cause Investigation
Act as a Lead Product Analyst. We observed a sudden drop of [PERCENTAGE_CHANGE]% in [KEY_METRIC] over the period [DATE_RANGE] in our dataset covering [BUSINESS_CONTEXT]. Help me build a root-cause decomposition framework to isolate the issue across dimensions [DIMENSIONS_LIKE_GEO_DEVICE_CHANNEL]. Output: 1) A structured diagnostic tree (MECE framework) to investigate potential drivers, 2) Specific SQL/Pandas slice-and-dice checks to isolate the issue, and 3) A template for communicating findings to stakeholders.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 17
Customer Segmentation & Persona Profiling
Act as a Customer Intelligence Lead. I ran a K-Means clustering analysis on customer behavioral metrics [METRICS_USED] resulting in [NUMBER_OF_CLUSTERS] distinct segments. The cluster centroids and metrics are [CLUSTER_SUMMARY_DATA]. Help me turn these numerical clusters into actionable business personas. Provide: 1) Descriptive names and narrative profiles for each persona, 2) Key behavioral differentiators, and 3) Specific business engagement or marketing strategies for each segment.
Run it with: or any assistant: ChatGPT, Claude, Gemini
Prompt 18
Actionable Financial & Variance Explanation
Act as a Senior FP&A Analyst. I have a variance dataset comparing projected vs. actual performance across metrics [METRIC_NAMES] for [BUSINESS_UNIT] during [TIME_PERIOD]. Actual values were [ACTUAL_VALUES] versus target values [TARGET_VALUES]. Analyze this performance variance to deliver: 1) A breakdown of favorable vs. unfavorable variances, 2) Identification of key revenue or cost drivers behind the variance, and 3) A concise bulleted report tailored for leadership decision-making.
Run it with: or any assistant: ChatGPT, Claude, Gemini

Tips for Effective AI Prompting in Data Analysis

Frequently Asked Questions

Can ChatGPT analyze large datasets directly?

ChatGPT can process small to medium datasets uploaded via CSV or Excel formats using Advanced Data Analysis features. For large enterprise datasets, it is best to use ChatGPT to write code or SQL queries that you run locally or on database servers.

How can I prevent data privacy issues when prompting ChatGPT?

Avoid uploading confidential metrics or Personally Identifiable Information (PII) directly into prompts. Instead, anonymize dataset column names and use synthetic representative samples when asking for code generation or structural analysis.

Are ChatGPT prompts accurate for advanced statistical modeling?

ChatGPT provides strong structural code and statistical guidance, but math operations should be calculated by executing generated Python or R code rather than relying on text output. Always run the code in your own environment to ensure exact numeric accuracy.

What placeholders should I substitute in these data prompts?

Replace bracketed fields such as [DATASET_DESCRIPTION], [COLUMNS], and [BUSINESS_GOAL] with your specific data attributes. Providing concrete details ensures the generated scripts and reports closely match your project goals.

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.

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

Get paid to train AI โ†’

See Zekai first in Google