Productive— faster every day
For your professionTeachersStudentsManagersMarketingDevelopersFreelancersParents

Prompt library · AI · 14 prompts

Prompts from the guide

Data Analysis with AI: From CSV to a Conclusion You Can Defend

14 prompts from this guide. Fill in whatever sits in [square brackets] — your own context, the document text or the name of your tool. That context is exactly what separates a generic answer from a usable one.

Read the full guide →

What a usable export looks like

Here is the header of my export and the first 20 rows (semicolon
delimiter, UTF-8 encoding, decimal comma):

[paste 20 rows including column names]

Don't do any calculations yet. Do a data audit:
1. For each column, determine its type (text, number, date,
   category) and what it likely means based on the name and values.
2. Flag problem columns: mixed formats, dates stored as text,
   numbers with a unit stuck in the cell, categories spelled
   differently (“Prague”, “prague”, “PRAGUE ”).
3. List what you need to ask me before you start calculating —
   typically whether prices include tax and whether cancelled
   orders should be excluded.
4. State what one observation is in this data.

Don't guess anything — where the sample doesn't give you certainty,
write it as a question for me.

Anonymization: what never gets uploaded

Write a Python script that prepares an anonymized copy of my CSV.
Column structure: [paste just the column names, no data]

The script should:
1. drop the columns [name, email, phone, address],
2. replace [customer_id] with a sequence number and save the
   mapping table to key.csv, which stays with me,
3. in the free-text column [note], only FLAG rows that contain
   an email, phone number, or possible name, and list them for
   review,
4. save data_anonym.csv with the same delimiter and encoding,
   and report how many rows and columns remain.

When the chat is allowed to calculate: tools that actually run code

We're working with my data file. For the whole conversation:

1. Never state a number from memory or estimate it — calculate
   every value with code and show me both the code and its output.
2. When you don't have the data or the tooling to calculate
   something, write “I can't calculate this” instead of an
   approximate answer.
3. For every result, state how many rows it came from and how
   many were excluded, and why.
4. When something is ambiguous (missing values, duplicates,
   suspicious categories), ask — don't decide on your own.
5. At the end of every answer, write one sentence about what
   could be skewing the result.

The prompt that produces an analysis script

Here's the header of my CSV (first 5 rows, semicolon delimiter,
UTF-8 encoding, decimal comma):

[paste 5 rows including column names]

Write a Python script (pandas, matplotlib) that:
1. loads the file as data/orders.csv and handles the local
   encoding and decimal comma,
2. cleans the data: drops rows with status [cancelled, unpaid],
   normalizes category spelling, converts [date] to a proper
   date type,
3. prints how many rows it loaded, how many it dropped, and why,
4. calculates revenue, order count, and average order value by
   month, and the same broken down by [category] and [source],
5. saves the numbers to results.csv and the charts to a charts/
   folder as PNG files.

Requirements:
- a comment on every step explaining WHY it's done,
- the script must handle empty cells without crashing,
- no hard-coded numbers — everything calculated from the data,
- print a control total at the end: revenue for the whole period.

What trustworthy output looks like

Loaded 14,203 rows, 18 columns.
Dropped 612 cancellations and 87 unpaid orders, 13,504 remain.
Missing values: category on 41 rows (kept as “unspecified”).

June breakdown by category (versus May):
category         may        june      change
Kitchen         24,500     23,900       -2.4%
Cleaning        16,700     16,050       -3.9%
Garden          20,400      8,150      -60.1%
Other           12,800      9,970      -22.1%

Control total for the period: $860,200
Results saved: results.csv, charts/revenue-months.png

Understanding the script even if you can't write it

Explain this script to me block by block, for someone who
doesn't program and doesn't want to learn.

For each block, write:
- what happens in it, in plain language,
- what decision about my data is hiding inside it (what it
  drops, what it fills in, what it rounds),
- what would happen if I skipped it.

Then, separately, list the places where the script could
silently return a wrong number without crashing (missing values,
duplicates, division by zero, a badly parsed date), and 5
questions my boss or a client might ask about this analysis,
along with answers.

[paste the script]

A data profile as the mandatory first step

Write a Python script that profiles the dataset — I want to know
what I'm working with before I start calculating. It should print:

1. the number of rows and columns,
2. for each column: type, share of missing values, number of
   unique values,
3. for numeric columns: minimum, maximum, mean, median, 1st and
   99th percentile,
4. for text columns: the 10 most common values with counts, and
   a flag for suspiciously similar pairs (identical except for
   spacing or capitalization),
5. for date columns: the earliest and latest date, and any
   missing periods (days or months with zero records),
6. total duplicate count, and duplicates by [key column],
7. rows with nonsensical values: negative prices, age outside
   0-120, dates in the future.

Make the output readable in the terminal, don't fix anything —
just report.

What can actually be learned from this data

Here's the profile of my dataset (output of the profiling script):

[paste the output]

Context: the data comes from [source], I use it for [purpose],
and I'm vaguely interested in [e.g. why revenue dropped in June].

Don't calculate anything. Propose 12 measurable questions that
CAN be answered from these columns. For each one, write:
- the question in one sentence,
- which columns and what calculation would answer it,
- what result would count as “yes” and what as “no”,
- what decision the answer would help me make.

Then list 5 questions that seem natural but this data can't
answer, and for each one say specifically what's missing.

Finally, mark the three questions I should start with, and
justify the choice.

Trend, seasonality, and noise

Write a Python script to analyze the time series in my data.
Columns: [date], [value], optionally [segment].

The script should:
1. aggregate the value by day, week, and month,
2. calculate a moving average over 7 and 30 days,
3. calculate a year-over-year comparison (same month last year)
   in percent,
4. normalize monthly values by the number of business days and
   show how much that changes the picture,
5. print a table of days where the value differs from the
   moving average by more than 2 standard deviations,
6. plot a chart: daily values light, the moving average bold,
   the deviations highlighted.

In comments, note what assumptions the method makes and when it
could mislead me (a short series, missing days, a change in how
the data is collected).

When you find an anomaly, break it apart

I have this finding in my data: [e.g. June revenue is -22%
versus May]. I want to know what's causing it.

Write a script that breaks the drop down into segment
contributions:
1. a breakdown by [category], [region], [source], [new vs.
   returning customer] — for each dimension, a table: period A,
   period B, absolute and percent change, and CONTRIBUTION to
   the overall change in percentage points, sorted by
   contribution,
2. a breakdown into number of orders versus average order value —
   I want to know whether fewer people bought, or they bought
   less each time,
3. a daily time series for the three most affected segments, so
   I can see whether the drop happened as a sudden jump or
   gradually.

Don't invent explanations, just return the numbers and a chart.

Choosing the chart type

Update the charting part of my script so the charts share a
single clean style suitable for a business presentation:
- a sans-serif font, labels at least 11 points,
- axis labels in plain language including units (“Revenue ($k)”),
- the chart title is a sentence with a conclusion, not a variable
  name (“The drop is confined to the Garden category”, not
  “Revenue by category”),
- thousands separators, the y-axis on bar charts starting at zero,
- at most 4 colors, the rest in shades of gray, readable in black
  and white too,
- no gridlines, no border, no 3D,
- add n (record count) and the period to the caption,
- export to a charts/ folder as PNG, 300 dpi, white background.

Put all these settings in one place at the top of the script.

An interactive chart as an artifact

Build me an artifact — an interactive overview of my data.

I'm pasting the input data as JSON (already aggregated, no
personal data, [count] rows):

[paste the aggregated data]

The overview should include:
- a period switcher (last 12 months / this year / all time),
- a filter by [category] with multi-select,
- four summary numbers at the top: revenue, order count, average
  order value, year-over-year change,
- a line chart of the trend over time that responds to the
  filters,
- a horizontal bar chart of the top 10 [products] with values,
- a table that can be sorted by clicking the header.

Style: clean, readable on a projector, with proper number
formatting. When filtering leaves fewer than 5 records, print
that instead of a chart.

Six ways to go wrong over correct numbers

Here are the results of my analysis (script output and chart
descriptions):

[paste the output]

Context: the data is [source, period, what it covers and what it
doesn't]. The tentative conclusion I'm leaning toward: [conclusion].

Don't write presentation copy. Answer in three blocks:
1) What the data literally says — only claims that follow
   directly from the numbers, citing which number each one comes
   from.
2) Alternative explanations for my conclusion: a confounding
   third variable, reverse causation, selection bias, seasonality,
   a change in methodology, a small sample.
3) What I CAN'T claim from this data, even if it would sound
   good — especially confusing correlation with causation, and
   generalizing beyond the sample.

At the end, write which single additional measurement would most
confirm or refute my conclusion.

From a number to a recommendation

I have a finished analysis with these results:

[paste the conclusions and key numbers]

Prepare talking points for a 15-minute presentation to [leadership
/ a client / the team]. Structure:
1. One sentence summarizing the finding (no numbers).
2. Three numbers that support it — each with a period and a base.
3. What follows from it: 2-3 possible courses of action, each
   with an estimated impact and its risk.
4. The three most likely objections from the audience, and a
   response to each.
5. What we still don't know and what we'd need to measure.

Use only numbers from my input, don't calculate anything new.
No superlatives. Where you're missing something, write TODO.

All prompts