A model is genuinely useful for data work in two ways: writing code you then run, and interrogating an analysis you have already done. It is least reliable at the thing people trust it with most, which is telling you what a result means.
The twenty prompts below run across six stages, from auditing a raw dataset through to critiquing your own finished analysis. Each has a note explaining why it works, and every one of them expects you to paste real structure or real data rather than describe it vaguely.
Four prompts for the stage that determines whether everything after it is meaningful. All four expect a pasted sample rather than a description, and GPT-5.6 Sol handles long, multi-step cleaning scripts well.
Prompt 1: Initial Data Audit
I have a dataset with the following columns and sample rows: [paste sample]. Act as a senior data analyst. Audit this dataset and tell me: (1) what each column likely represents, (2) which columns have data quality issues such as nulls, inconsistencies, or likely errors, (3) what questions this data can and cannot reliably answer, and (4) what cleaning steps I should take before analysis.
Why it works: the four-part structure forces a full audit instead of a surface scan.
Prompt 2: Data Cleaning Code
Write Python (pandas) code to clean this dataset: [paste sample or describe structure]. The cleaning should: (1) handle missing values in [column names] using [strategy: drop / fill with median / fill with mode / forward fill], (2) standardise inconsistent values in [column] - for example [list known inconsistencies], (3) convert [column] to the correct data type, and (4) remove duplicate rows based on [key columns]. Add a comment explaining each cleaning step.
Why it works: naming a strategy per column stops the model guessing, and comments make the code auditable. Print the row count after each step.
Prompt 3: Outlier Detection
I have a dataset with numerical columns [list columns]. Write Python code to: (1) detect outliers in each column using both the IQR method and Z-score method, (2) print a summary showing how many outliers each method flags in each column, and (3) explain the difference between the two methods and when I should use each one. My dataset has [number] rows and represents [describe what the data is].
Why it works: comparing two methods helps you judge whether flagged values are real outliers or valid data.
Prompt 4: Feature Engineering
I am analysing a dataset about [describe subject: e.g. customer transactions, website sessions, employee records]. My columns are: [list columns]. Suggest 5 to 8 new features I could engineer from the existing columns that would be useful for [describe your goal: e.g. predicting churn, understanding seasonal patterns, segmenting customers]. For each feature, explain what it captures and write the pandas code to create it.
Why it works: tying features to a goal makes the suggestions actionable, and the code lets you test each one straight away.
Never accept a cleaning step without checking what it removed. The most expensive errors in data work are silent ones, and a fillna applied to the wrong column produces a result that looks entirely normal.
Four prompts for finding out what is in the data. Anchor every one of them to a business question, because unanchored exploration produces output rather than answers. For research-grade statistics and study design, see our ChatGPT prompts for quantitative data analysis.
Prompt 5: EDA Plan
I am starting exploratory data analysis on a dataset about [describe subject]. My business question is: [state your question]. The dataset has these columns: [list columns with types]. Write a structured EDA plan that covers: (1) univariate analysis for key columns, (2) bivariate analysis for relationships most relevant to my business question, (3) the visualisations I should create and why, and (4) the hypotheses I should test. Then write the Python code to execute the plan.
Why it works: a business question keeps EDA focused instead of turning it into a fishing expedition.
Prompt 6: Correlation Analysis
My dataset has these numerical columns: [list columns]. My target variable is [column name]. Write Python code to: (1) compute a correlation matrix, (2) identify the top 5 features most correlated with the target, (3) create a heatmap using seaborn, and (4) explain what the correlation values mean in plain language, including what high correlation does and does not tell me about causation.
Why it works: the plain-language clause guards against reading correlation as causation.
Prompt 7: Segmentation and Grouping
I want to understand how [metric: e.g. revenue, engagement, churn rate] varies across different segments of my data. My dataset has these grouping variables: [list categorical columns]. Write Python code to: (1) calculate [metric] by each grouping variable individually, (2) calculate [metric] by the most interesting two-way combinations, (3) flag any segments that are significantly above or below average, and (4) produce a clear summary table of findings.
Why it works: flagging standout segments gives you analysis, not just tables. Treat a single standout segment as a hypothesis, not a finding.
Prompt 8: Time Series Exploration
I have time series data with a date column [column name] and a metric column [column name]. The data covers [date range] and represents [describe what the metric is]. Write Python code to: (1) resample the data at daily, weekly, and monthly levels, (2) plot the trend for each level, (3) calculate and plot a 7-day and 30-day rolling average, (4) identify the top 5 peaks and troughs and label them on the chart, and (5) describe what patterns are visible and what might explain them.
Why it works: several time granularities reveal patterns a single view misses, and labelled peaks give you a starting point for root-cause analysis.
Write the business question down before you start and keep it visible. If your data is interviews or open-ended text rather than numbers, our ChatGPT prompts for qualitative data analysis are a better fit.
Three prompts for queries. This is where a model is most useful, because the output is code you can verify by running it. Always name your dialect, and a coding-oriented model such as Claude Sonnet 4.6 or DeepSeek V4 Pro is a sensible default.
Prompt 9: Complex Aggregation Query
I am working with a SQL database. My schema is: [describe tables and key columns, or paste CREATE TABLE statements]. Write a SQL query to [describe what you want to calculate: e.g. calculate monthly revenue by product category, with month-over-month growth rate and a 3-month rolling average]. Use [SQL dialect: PostgreSQL / BigQuery / MySQL / Snowflake]. Add comments explaining each section of the query and flag any assumptions you have made about the schema.
Why it works: naming the dialect avoids syntax errors, and flagged assumptions catch schema mismatches before you run the query.
Prompt 10: Cohort Analysis Query
Write a SQL cohort analysis query using my tables: [describe schema]. I want to: (1) group users by the month they first [performed action: e.g. made a purchase, signed up], (2) track what percentage of each cohort returned in months 1, 2, 3, 6, and 12 after their first action, and (3) output a cohort retention grid I can export to a spreadsheet. Use [SQL dialect]. Explain how cohort analysis works and what I should look for in the results.
Why it works: you get working cohort code plus guidance on how to read the results.
Prompt 11: Query Optimisation
I have this SQL query that is running slowly: [paste query]. My database is [SQL dialect] and the tables involved have approximately [row counts]. Review the query and: (1) identify what is likely causing the performance issue, (2) rewrite it to be more efficient, (3) suggest any indexes that would speed up this type of query, and (4) explain the changes you made and why they improve performance.
Why it works: explanations alongside the fix help you write faster queries yourself next time.
Run the rewritten query alongside the original and compare the output before you trust the faster one. A query that returns the wrong answer quickly is not an optimisation.
Three prompts, and the stage that needs the most care. A model will explain a statistical result fluently whether or not the result means anything, so tell it how many comparisons you made and how the test was designed before you ask what the number means. Claude Sonnet 5 tends to be careful about caveats, and the AI math calculator is handy for checking a formula by hand.
Prompt 12: Hypothesis Testing
I want to test whether [describe hypothesis: e.g. customers who received the discount have higher average order value than those who did not]. My dataset has [describe relevant columns and sample sizes]. Recommend the appropriate statistical test for this hypothesis, explain why it is the right choice, write Python code to run the test, and interpret the results in plain language including what the p-value means for my business decision.
Why it works: asking for a justified test choice builds your intuition. Say how many hypotheses you are testing in total.
Prompt 13: A/B Test Analysis
I ran an A/B test with the following setup: control group size [n], treatment group size [n], control conversion rate [%], treatment conversion rate [%], test duration [days]. Analyse this A/B test and tell me: (1) whether the result is statistically significant and at what confidence level, (2) the practical significance - is the effect size large enough to matter for my business, (3) whether there are any concerns about the test design that might invalidate the result, and (4) what I should do next.
Why it works: it separates statistical significance from practical significance. Mention whether you stopped the test early or checked it mid-run.
Prompt 14: Regression Analysis
I want to understand what drives [target variable] in my dataset. My features are: [list columns]. Write Python code to: (1) run a linear regression with [target] as the dependent variable and [feature list] as independent variables, (2) check the key regression assumptions (linearity, homoscedasticity, normality of residuals, multicollinearity), (3) interpret the coefficients in plain language, and (4) identify which features have the most predictive power and flag any that should be removed.
Why it works: built-in assumption checks give you a valid model. Read coefficients as association unless the data came from an experiment.
Tell it what you did, not just what you found: whether you stopped a test early, how many metrics you checked and whether the data came from an experiment. To brush up on the maths behind these tests, see our ChatGPT prompts for learning maths.
Three prompts for the stage where analysis either lands or does not. Naming your audience changes the output more than any other variable here, and the AI summarizer can condense long notes before you write the narrative.
Prompt 15: Chart Selection and Code
I want to visualise [describe what you want to show: e.g. the distribution of customer ages by product category, the trend in weekly revenue over the past year, the relationship between marketing spend and conversions]. My dataset has these relevant columns: [list]. Recommend the best chart type for each visualisation and explain why. Then write Python code using matplotlib and seaborn to create each chart with proper titles, axis labels, and a colour scheme that works for business presentations.
Why it works: asking for a justification teaches you why a chart fits, not just how to draw it.
Prompt 16: Dashboard Design Plan
I am building a data dashboard for [describe audience: e.g. the sales leadership team, the marketing team, the board]. Their primary question is: [state the question]. My available data covers: [describe datasets and key metrics]. Design a dashboard structure that includes: (1) the 3 to 5 most important KPIs to show at the top, (2) the supporting charts and breakdowns, (3) the filters and controls users will need, and (4) the layout and visual hierarchy. Explain why each element earns its place on the dashboard.
Why it works: starting from the audience’s main question produces a dashboard people actually use.
Prompt 17: Insight Narrative
I have completed an analysis of [describe subject] and found the following key results: [paste your findings or summary statistics]. Write an executive summary of these findings for [describe audience: e.g. the CFO, the product team, the board]. The summary should: (1) open with the most important finding, (2) explain what it means for the business in plain language, (3) highlight 2 to 3 supporting findings, (4) identify the key uncertainty or caveat in the analysis, and (5) close with a clear recommendation. Keep it under 300 words.
Why it works: leading with the key finding mirrors how executives read, and the caveat keeps the summary honest.
Keep part 4 of prompt 17 in every summary you write — an analysis presented without its main caveat will eventually be quoted back to you without it. For reporting on search data specifically, see our ChatGPT prompts for SEO.
The last three. Prompt 20 is the one the original version of this page called the most valuable on the list, and that assessment is correct. For more business-focused insight and reporting prompts, see our AI prompts for data analysis.
Prompt 18: Customer Segmentation
I want to segment my customers based on their behaviour. My dataset has these customer-level features: [list features, e.g. total spend, purchase frequency, days since last purchase, product categories purchased]. Write Python code to: (1) normalise the features, (2) use K-means clustering to segment customers into 3 to 6 groups, (3) determine the optimal number of clusters using the elbow method, (4) profile each segment - what makes them distinct - and (5) suggest a name and a business action for each segment.
Why it works: a name and an action for each segment turns clusters into something the business can use.
Prompt 19: Anomaly Detection
I need to detect anomalies in my [describe data: e.g. daily transaction volume, server response times, weekly sales figures]. My dataset has [describe structure and time range]. Write Python code to: (1) apply Isolation Forest to detect anomalies, (2) visualise the results showing normal and anomalous points, (3) print a table of the top 10 most anomalous records with their key values, and (4) explain what kinds of anomalies this method is good at detecting and what it might miss.
Why it works: asking what the method might miss keeps you aware of Isolation Forest’s limits.
Prompt 20: Analysis Review and Critique
I have conducted the following analysis: [describe or paste your analysis, methodology, and findings]. Act as a critical peer reviewer. Identify: (1) any methodological weaknesses or invalid assumptions, (2) alternative explanations for the findings I may have overlooked, (3) confounding variables I should have controlled for, (4) whether my conclusions are supported by the evidence or overstate it, and (5) what additional analysis would strengthen or challenge my conclusions.
Why it works: a critical review before you present catches the errors confirmation bias hides.
Run prompt 20 while there is still time to act on the answer. Shorter general-purpose versions of these checks are in our best ChatGPT prompts collection.
Paste real structure rather than describing it. A schema, ten sample rows, actual column names and actual row counts change the output completely, and nothing on this page works well without them. Redact or rename anything sensitive first - the prompts do not depend on real customer names or real company identifiers.
For the SQL and Python prompts, running the same query through two models is a cheap way to catch a logic error before it reaches a dashboard. If you are pasting a large export or a long schema, Gemini 3.5 Flash holds more of it at once, which matters when the data itself is the constraint.
You can try every prompt on this page free in the Chat Smith AI chat.
And the habit that matters most: run the code, check the row counts, and tell the model what you did before asking what it means. Every serious error in AI-assisted analysis comes from skipping one of those three.
ChatGPT prompts for data analysis are instructions that ask an AI model to work through a dataset task: cleaning rules, a formula, a query, code for a chart, or an interpretation of results you already have. The useful ones describe your columns and your question rather than asking for general advice.
The Chat Smith Editorial Team is a group of AI enthusiasts, researchers, and content creators passionate about making artificial intelligence more accessible and practical. Through the Chat Smith blog, we share the latest AI trends, tool reviews, industry insights, and actionable guides to help individuals and businesses get more value from AI. Our mission is simple: deliver clear, reliable, and easy-to-understand content that helps readers stay informed, productive, and ahead in the fast-moving world of AI.