These 22 prompts turn Gemini 3.1 Pro into a working data analyst. They lean on the model's real strengths: a 1M-token context that swallows a large CSV, data analysis / code execution that runs actual Python instead of guessing arithmetic, tight Google Sheets integration (Fill with Gemini, formula generation, charts), and grounding with Google Search for benchmarking against current outside numbers.

Two habits make every prompt below more reliable: paste your real data (or reference a Sheet by name) instead of describing it, and ask Gemini to show its formula or code so you can check the math. Use High thinking for anything statistical. For the broader set, see the best Gemini prompts roundup, and pair this with Gemini prompts for Google Workspace.

Advertisement

Explore & understand a dataset

Start here when you have data but no questions yet. These prompts profile the structure, surface what is interesting, and flag what is broken before you commit to an analysis.

1. Profile a fresh dataset

Here is a dataset with [row count] rows and these columns: [column names]. Data below:

[paste your CSV]

Profile it for me. For each column give: data type, number of missing values, number of unique values, and for numeric columns the min, max, mean, and median. Flag any columns that look mislabeled, mostly empty, or have suspicious values. End with 3 things about this data I should be careful about before analyzing it. Use code execution and show the code you ran.

Best for: the first pass on any new CSV before you trust a single number.

2. Interview my data with questions

Using the data in the Sheet named "[Sheet name]" (columns: [column names]), act as a data analyst and generate the 8 most useful questions this dataset can answer for someone deciding [the decision you're making]. For each question, say which columns it uses and roughly how you'd compute the answer. Rank them by how actionable they are. Don't answer them yet — just plan the analysis.

Best for: turning a raw table into a focused analysis plan.

3. Find anomalies and outliers

Analyze the numeric columns [column names] in the data below for outliers and anomalies.

[paste your CSV]

Use code execution. For each numeric column, list rows more than 3 standard deviations from the mean and rows outside 1.5x the IQR. Separately flag anything that looks like a data-entry error (impossible values, wrong units, duplicated IDs). Show the exact rows and explain why each was flagged. Do not remove anything — just report.

Best for: catching bad rows before they distort every downstream stat.

4. Read a pasted chart image

[paste or attach the chart image]

Read this chart for me. The x-axis is [what x is] and the y-axis is [what y is, with units]. Tell me the approximate value at each labeled point, describe the overall trend, name the highest and lowest points, and note anything unusual. Then give me your best estimate of the underlying data as a small table. Flag that these are read-off estimates, not exact figures.

Best for: pulling numbers out of a chart in a PDF or slide you can't get the source data for.

Google Sheets formulas & Fill with Gemini

Gemini writes formulas, fills columns, and turns messy inbox and Drive content into structured rows. Reference the Sheet by name or work in the Sheets side panel so it acts on live cells.

5. Write a Sheets formula from a description

In Google Sheets I have data in columns [e.g. A: date, B: region, C: revenue, D: cost]. Write a formula for cell [e.g. F2] that [describe exactly what you want, e.g. "returns total profit (revenue minus cost) for the East region in Q2 2026"]. Give me the single formula, then explain each part in one line, and note any edge case that would break it (blank cells, text where a number is expected). Prefer a formula that fills down cleanly.

Best for: getting a correct SUMIFS, QUERY, or ARRAYFORMULA without trial and error.

6. Fill with Gemini category column

In the Sheet "[Sheet name]", I want a new column "[Category]" that classifies each row in column [e.g. B, the description text] into one of: [list your categories]. Here are 3 examples of how I'd label them:
[row text] -> [category]
[row text] -> [category]
[row text] -> [category]
Set up the column so Fill with Gemini can complete the rest, and show me the instruction I should give Fill with Gemini so it follows this exact pattern. Keep categories to only the list above — use "Other" if nothing fits.

Best for: categorizing hundreds of rows (tickets, expenses, feedback) without doing it by hand.

7. Turn Gmail or Drive into a structured sheet

Find my [e.g. order-confirmation] emails from [sender or timeframe] and build a structured table in a new Google Sheet. Columns: [e.g. Date, Vendor, Order number, Item, Amount, Currency]. One row per order. Pull the values straight from each email, leave a cell blank if the value isn't present rather than guessing, and add a "Source" column linking back to the email. After building it, tell me how many rows you created and any emails you skipped and why.

Best for: converting a pile of Gmail or Drive documents into an analyzable sheet.

8. Debug a broken formula

This Google Sheets formula isn't doing what I want:

[paste the formula]

It's in cell [cell] and it's returning [what it returns, e.g. #REF! or a wrong number]. What I actually want is [describe the intended result]. My columns are [column names and what they hold]. Tell me exactly why it's failing, give me the corrected formula, and explain the one change that fixed it.

Best for: #REF!, #VALUE!, and formulas that run but return the wrong answer.

Advertisement

Clean & transform data

Before analysis, the data usually needs work. These prompts standardize text, kill duplicates, and reshape tables — with the exact steps shown so you can reproduce them.

9. Standardize messy text columns

Column [e.g. "Country"] in the data below has inconsistent values — different spellings, casing, and abbreviations for the same thing.

[paste your CSV or the column]

Use code execution to produce a cleaned version. Map every variant to one canonical value (e.g. "USA", "U.S.", "united states" -> "United States"). Return two things: the mapping table you used, and the cleaned column. Also give me a Google Sheets formula or approach to apply the same cleanup in a live sheet. Don't invent categories that aren't in the data.

Best for: free-text columns where the same value is spelled five ways.

10. Deduplicate and reconcile rows

The data below may contain duplicate records for the same [e.g. customer], keyed on [column(s) that identify a unique record].

[paste your CSV]

Use code execution to find exact and near-duplicate rows (same key, minor differences in other fields). For each duplicate group, show the rows and recommend which one to keep and how to merge conflicting fields. Give me the final deduplicated row count and the count removed. Show your logic.

Best for: reconciling exports where the same entity appears more than once.

11. Reshape wide to long

My data is in wide format — one column per [e.g. month], like this:

[paste a few rows of your CSV]

Use code execution to reshape it to long/tidy format with columns [e.g. ID, Month, Value] so it's ready for pivoting and charting. Return the reshaped table and the code. Then tell me the Google Sheets or QUERY approach to do the same unpivot in a live sheet.

Best for: making spreadsheet exports chart- and pivot-friendly.

Charts & visualization

Gemini can pick the right chart, actually render it with code execution, and lay out a dashboard. Tell it the story you want the chart to tell.

12. Recommend the right chart type

I want to show [the point you're trying to make, e.g. "how revenue split by region changed across 2025 and 2026"] using these columns: [column names and types]. Recommend the single best chart type for that message and explain why in two sentences. Then name a second option and when I'd prefer it. Tell me exactly which column goes on which axis / series / color, and one thing to avoid so the chart isn't misleading.

Best for: choosing between bar, line, stacked, and scatter before you build anything.

13. Build a chart with code execution

Using code execution, build a [chart type, e.g. grouped bar] chart from the data below.

[paste your CSV]

Plot [x column] on the x-axis and [y column(s)] as [bars/lines], grouped/colored by [column]. Title it "[title]", label both axes with units, sort [how], and format large numbers with thousands separators. Render the chart, then give me the values behind it as a small table so I can verify it. Keep it clean — no chartjunk.

Best for: a real rendered chart plus the numbers to check it against.

14. Design a dashboard layout

I'm building a one-screen dashboard for [audience, e.g. the leadership team] to track [what they care about]. My data has these columns: [column names]. Propose a layout: the 4-6 tiles I should show, what each one is (a KPI number, a trend line, a breakdown bar, etc.), which columns feed it, and where it sits on the screen (top row = most important). For each tile, give the Google Sheets formula or chart setup to build it. Keep it to metrics that drive a decision.

Best for: going from a table to a decision-ready dashboard spec.

15. Rebuild a pasted chart's data

[paste or attach the chart image]

Extract the underlying data from this chart into a table I can put in Google Sheets. The x-axis is [what it is], the y-axis is [what it is, with units], and the series are [what each line/bar represents]. Give me the values as best you can read them, mark any you're unsure about, then suggest a cleaner chart type to redraw it. These are estimates read from the image — say so.

Best for: recreating a competitor's or report's chart when you only have the picture.

Advertisement

Statistics & modeling

Switch to High thinking here and keep code execution on so the numbers are computed, not predicted. Ask for caveats — good statistics come with them.

16. Run descriptive statistics with caveats

Use High thinking and code execution. Compute descriptive statistics for [metric column(s)] in the data below, broken down by [grouping column].

[paste your CSV]

For each group give count, mean, median, standard deviation, and the 25th/75th percentiles. Show the code. Then flag any group where the sample size is too small to trust, where the mean is skewed by outliers, or where the distribution is clearly non-normal — and say what that means for how I should read the numbers.

Best for: summary stats you can actually defend in a meeting.

17. Correlation and simple regression

Use High thinking and code execution. In the data below, I want to understand how [outcome column] relates to [driver column(s)].

[paste your CSV]

Compute the correlation between them and fit a simple linear regression. Report the coefficient, R-squared, and p-value, and translate them into plain English (does it hold up, and how strong is it). Explicitly warn me about correlation vs causation, confounders I might be missing, and whether the sample supports this conclusion. Show the code.

Best for: a defensible "does X drive Y?" answer with the honest caveats.

18. Forecast a time series

Use High thinking and code execution. Here is a time series of [metric] by [day/week/month]:

[paste your CSV with a date column and a value column]

Forecast the next [N periods]. Explain which method you chose and why (trend, seasonality, sample length), give the forecast with a range, not just a point estimate, and plot the history plus forecast. State the assumptions and what would make this forecast wrong. Don't over-claim precision on a short series.

Best for: a quick, caveated forecast without leaving the chat.

Insights & reporting

The last step is turning numbers into something a person can act on. These prompts summarize, benchmark, segment, and write the message.

19. Executive summary of the numbers

Here is the analysis / data below.

[paste your CSV, table, or the results from an earlier prompt]

Write an executive summary for [audience] in under 150 words. Lead with the single most important finding, then the 3 supporting points, then one recommended action. Use specific numbers from the data, not vague words. Separately, list any caveat or data-quality issue they should know before acting. No filler.

Best for: the top-of-deck summary that gets read first.

20. Benchmark against external data

Turn on grounding with Google Search. My [metric, e.g. email open rate] for [context, e.g. B2B SaaS in 2026] is [your number]. Find current, credible external benchmarks for the same metric and industry, cite the sources with dates, and tell me whether my number is above, at, or below typical. Note how recent and reliable each benchmark is, and flag if definitions differ (so I'm not comparing apples to oranges).

Best for: putting your number in context with sourced, current benchmarks.

21. Cohort and segment breakdown

Use code execution. Break the data below into segments by [dimension, e.g. signup month or plan tier] and compare [metric] across them.

[paste your CSV]

For each segment show the metric, the sample size, and how it differs from the overall average. Call out the best- and worst-performing segments, whether the gaps are big enough to matter given the sample sizes, and one hypothesis for the biggest gap. Show your work and end with what I'd test next.

Best for: finding which cohort or segment is actually moving the number.

22. Turn analysis into a stakeholder email

Take the findings below and write a short email to [recipient/role].

[paste your findings or the output from an earlier prompt]

Subject line that states the takeaway. First line = the answer they need. Then 3 bullets with the key numbers, then a clear ask or next step. Keep it under 180 words, plain and confident, no jargon. Add a one-line note on any caveat so they don't over-read the data. Give me the subject and body ready to paste.

Best for: shipping the insight, not just having it.

Want more Gemini workflows? See the best Gemini prompts roundup, the reference-style Gemini prompt cheat sheet, and reusable Gemini prompt templates.

Frequently Asked Questions

Does Gemini actually compute the numbers or just guess them?

With data analysis or code execution turned on, Gemini 3.1 Pro writes and runs real Python on your data, so the sums, means, and regressions are computed rather than predicted. If you paste numbers into a plain chat with no code execution, it can approximate and get arithmetic wrong. Ask it to show the code or the Sheets formula it used so you can confirm the math is real.

Should I paste a CSV or reference a Google Sheet by name?

Paste a CSV when the data is small, one-off, or not in Drive — it drops straight into Gemini's 1M-token context. Reference a Sheet by name (or use Gemini in the Sheets side panel) when the data lives in Drive, updates over time, or you want formulas and charts written back into the sheet itself. Referencing a Sheet also lets Fill with Gemini and the Sheets integration act on live cells.

How big a dataset fits in Gemini's 1M-token context?

Roughly a few hundred thousand rows of narrow numeric data, or tens of thousands of wide rows, will fit in the 1M-token window as pasted CSV. Past that, sample the data, aggregate it first, or connect the full Sheet and let code execution read it in chunks. For anything large, tell Gemini the row count and column names up front so it plans the analysis instead of truncating silently.

What is Fill with Gemini and when should I use it?

Fill with Gemini is a Google Sheets feature that generates values for a column based on a few examples and the surrounding data — categorizing rows, extracting fields, drafting text, or classifying sentiment. Use it for repetitive per-row work you would otherwise do by hand. Give it 2-3 filled-in example rows so it learns the pattern before it fills the rest.

How do I verify Gemini's results and see the formulas?

Add a line like "show the exact formula or Python you used and explain each step" to any analysis prompt. Then spot-check one row or one total by hand, and for Sheets formulas paste them into a cell and confirm the output matches. Treating Gemini's answer as a draft you audit — not a final number — is the safe way to work.

Can Gemini read a chart image I paste in?

Yes. Gemini 3.1 is multimodal, so you can paste a screenshot of a chart, dashboard, or table and ask it to read off the values, describe the trend, or rebuild the data behind it. Tell it which axis is which and the units so it reads the scale correctly, then double-check any number you plan to reuse.

How do I adapt these prompts to my own data?

Replace every bracketed placeholder — [paste your CSV], [Sheet name], [column names], [metric] — with your real values before sending. Name your actual columns so Gemini references them correctly, state the row count, and say what decision the analysis feeds. The more specific the context, the less Gemini has to guess.

Which thinking level should I use for data work?

Use High thinking for statistics, modeling, and anything where the reasoning chain matters — regressions, forecasts, significance tests. Standard thinking is fine for quick summaries, formula generation, and cleaning. Higher thinking is slower but catches edge cases and states caveats you would otherwise miss.

Advertisement