How to Use ChatGPT for Data Analysis (15 Prompts)

How to Use ChatGPT for Data Analysis (With 15 Copy-Paste Prompts)

ChatGPT won't replace your judgment on a data analysis project, but it's a genuinely useful accelerator for the repetitive parts — writing formulas, explaining unfamiliar code, drafting summaries. These 15 prompts are organized by task, ready to copy, paste, and adapt with your own details.

Cleaning and Preparing Data

1. "I have a column of dates in inconsistent formats (some MM/DD/YYYY, some written out like 'March 3, 2024'). Write a Python/pandas function to standardize them to YYYY-MM-DD."

2. "Here's a sample of messy column headers from a spreadsheet: [paste headers]. Suggest clean, consistent naming conventions for each."

3. "I need to identify duplicate rows in a dataset based on a subset of columns, not the whole row. Write the pandas code, and explain what counts as a duplicate in this context."

4. "Explain the difference between dropping rows with missing values versus imputing them, and help me decide which approach fits a dataset where 8% of a 'customer age' column is missing."

Writing and Debugging Code

5. "Here's a SQL query that's returning more rows than expected: [paste query]. Walk through what might be causing the duplication."

6. "Write a pandas groupby query that calculates total revenue and average order value per customer segment."

7. "Explain what this DAX formula does, step by step: [paste formula]." — useful for inheriting someone else's Power BI report.

8. "I want to calculate a 3-month rolling average of sales in Excel. Walk me through the formula, and explain what each part does."

Analysis and Interpretation

9. "I ran a t-test comparing two groups and got a p-value of 0.03. Explain what this does and doesn't tell me in plain language."

10. "Here's a summary of my analysis findings: [paste bullet points]. Help me identify which finding is actually the most decision-relevant, and which are secondary detail."

11. "I'm seeing a correlation between two variables in my data. Help me think through alternative explanations before I assume causation."

12. "Given this dataset description [describe your data], what are three analyses I might be missing that would be worth exploring?"

Communicating Results

13. "Turn this technical analysis summary into three bullet points a non-technical executive could understand in 30 seconds: [paste your summary]."

14. "Write a one-paragraph email summarizing these findings for a stakeholder who has 2 minutes to read it: [paste findings]."

15. "Suggest a chart type for showing [describe your data and what you want to compare], and explain why it fits better than a couple of common alternatives."

What ChatGPT Is Genuinely Good At

Explaining code you didn't write. Inheriting a messy SQL query or DAX formula from a departed colleague is a common, tedious task ChatGPT handles well — it's often faster than reverse-engineering logic line by line yourself.

First-draft formula and query writing. Describing what you want in plain language and getting a starting formula or query saves real time, especially for syntax you don't use often.

Rewriting technical findings for non-technical audiences. This translation task is one of the more reliably strong use cases, since it's fundamentally a language task, not a data-accuracy task.

What It's Not Good At — and Why That Matters

Verifying its own output against your actual data. ChatGPT can write a plausible-looking formula or query, but it cannot check that formula against your real dataset unless you're using it with actual data access (like Code Interpreter/Advanced Data Analysis). Always run and verify the output yourself.

Catching subtle data quality issues specific to your dataset. It doesn't know your data's history, known quirks, or business context unless you tell it — it can suggest general cleaning approaches but can't catch what it doesn't know exists.

Making judgment calls about what matters to your specific stakeholders. It can help you draft a summary, but knowing which finding will actually move your specific executive to action requires context ChatGPT doesn't have.

A Practical Workflow

Use ChatGPT to draft, not to finalize. Write the formula, run it against your real data, check the output makes sense, then iterate. This keeps the speed benefit without the risk of shipping an unverified number into a real business decision.

Frequently Asked Questions

Is it safe to paste real company data into ChatGPT? Check your organization's data policy first — many companies restrict what can be shared with external AI tools, and enterprise versions with different data handling terms may be required.

Can ChatGPT replace learning SQL or Python? No — it accelerates people who already understand the underlying logic and can verify its output. Without that foundation, you can't catch when it's wrong. See our SQL roadmap if you're building that foundation.

Is ChatGPT better than Claude or Gemini for this kind of work? They're closely comparable for most of these use cases — see our ChatGPT vs Claude vs Gemini for data work comparison for specifics.

Do I need a paid ChatGPT subscription for this? The free tier handles most of these prompts fine. Paid tiers add features like direct data file upload and code execution, which help for more hands-on analysis tasks.

Bottom Line

ChatGPT is a genuine accelerator for the repetitive parts of data analysis — formula drafting, code explanation, and stakeholder-facing summaries — but it doesn't replace verifying results against your actual data or understanding what your specific audience needs to hear. Use it to draft faster, not to skip the checking step.

Enjoyed this article?

Share it with your network

Listings related to How to Use ChatGPT for Data Analysis (With 15 Copy-Paste Prompts)