Start by explaining what one row means and how the columns should be read. Ask ChatGPT to inspect the file before calculating anything. Agree on missing-value and duplicate rules, show the counts behind each result, and check the important totals with a spreadsheet or reproducible calculation.
What you need before you start
You have a CSV and need a finding that depends on the data being read correctly.
Bring: Permitted CSV, a short column dictionary, date and number formats, row meaning, duplicate and missing-value rules, and one decision question.
Start with these steps
- Ask ChatGPT to describe columns, types, delimiter and sample anomalies before analysis.
- Define the question and denominator in plain language.
- Request a report of duplicates, missing values and excluded rows.
- Recalculate one important total or rate outside the generated summary.
- Export the transformation and assumptions with the result so another person can reproduce it.
A prompt you can adapt
Analyze this CSV for [question]. One row means [unit]. Column definitions: [definitions]. First inspect delimiter, row count, types, dates, missing values and possible duplicate keys. Do not drop or repair rows silently. After the rules are confirmed, show filters, exclusions, grouping, formulas, numerator and denominator. Return the calculation or code, a small checkable sample, findings and limitations. State what was actually executed and what is only suggested.
Replace every bracket with real information. Remove fields that do not affect your task.
What this looks like in practice
Teaching example: five raw order lines include one repeated line and one cancelled order. After the stated rules, three completed lines belong to two orders and total 65. Average revenue per order is 65 ÷ 2 = 32.50. Dividing by three would answer a different question about lines.
Define one row before asking for insights
A CSV is a text file arranged into rows and columns. Before asking ChatGPT for trends, explain what a row represents. It could be one order, one item within an order, one customer, one website event or one monthly total. The same row count means very different things in those files.
An order with three items may appear on three rows. Counting rows would then count items, not orders. A customer appearing on several orders is not automatically a duplicate. Tell ChatGPT which columns identify the thing you want to count. A clear row definition prevents a wrong assumption from entering every later chart.
State one useful question. For example: What was net revenue per completed order in this period? That gives the analysis a target. A general request to find anything interesting can produce many patterns without showing which one matters to your decision.
Give the columns a small dictionary
A data dictionary is a short explanation of the columns. For each important column, state its meaning, unit and what a blank means. Amount might mean the whole order or only one line. Status might describe payment, delivery or cancellation. Revenue may include or exclude tax and refunds. These are business rules, not details a model should guess from a heading.
Add date and number conventions. A date such as 04/05/2026 is ambiguous without a format. State the time zone when a day boundary matters. Explain the currency and decimal mark for amounts. Keep postcodes, account codes and item identifiers as text when leading zeros matter.
Remove private fields the task does not need. If the question is about totals by day, you may not need names, email addresses or street addresses. Keep a raw original in your own storage and use a permitted working copy. Cleaning should not erase the only copy of the evidence.
Inspect the file before cleaning it
Ask for the delimiter, column names, row count and a small sample as parsed. A delimiter is the character separating fields, commonly a comma, semicolon or tab. A comma inside a description must be quoted correctly or it may create an extra column. Check that the parsed rows match the original text.
Look for missing fields, impossible values and possible duplicate keys. Ask ChatGPT to describe problems before fixing them. A blank amount might be unknown rather than zero. A repeated customer is often legitimate. A duplicate row may be an export mistake, but you need a rule to establish that.
Check fields likely to expose parsing problems: text with commas or accents, quoted text, negative amounts, leading zeros and dates with both day and month below thirteen. If these are wrong, stop the analysis and fix the import first. A later chart cannot repair a file that was read into the wrong columns.
Teaching example: five raw order lines
This teaching example uses made-up data in one example currency. Each row is an order line. The combination order_id plus line_id identifies a line. The amount is already the net line amount, not the whole order total. Cancelled lines should be excluded from completed-order revenue. An exact repeated line should be counted once.
The raw file has the five rows shown below. O100 has two different lines, so those rows are not duplicates. O101 line one appears twice with the same values; the teaching rule treats the second copy as an export duplicate. O102 is cancelled. The source therefore contains five rows but not five completed orders.
Before calculating, confirm these definitions. If repeated lines represented separate shipments in your real file, deleting one would be wrong. The example's duplicate rule is stated evidence for this calculation, not a rule for every CSV.
| order_id | line_id | customer_id | status | amount |
|---|---|---|---|---|
| O100 | 1 | C01 | completed | 20.00 |
| O100 | 2 | C01 | completed | 30.00 |
| O101 | 1 | C02 | completed | 15.00 |
| O101 | 1 | C02 | completed | 15.00 |
| O102 | 1 | C03 | cancelled | 10.00 |
Keep a cleaning log with before-and-after counts
For the teaching file, start with five raw rows. Remove one exact duplicate using order_id plus line_id and matching values: four rows remain. Exclude the one cancelled line from completed revenue: three lines remain. These three lines belong to two distinct completed orders. Record the removed rows and reasons rather than letting them disappear silently.
Use the right order of operations. If duplicates have conflicting values, do not simply keep the first without an agreed rule. Put them in an exception list and ask which source is authoritative. A duplicated key with different amounts is a data problem, not an invitation to choose the value that gives a nicer result.
Keep missing values visible. If a completed line has no amount, you may count the order while reporting revenue as incomplete. Do not fill it with zero unless zero is supported by the data definition. The cleaning log should explain which calculations exclude it and how that affects the result.
Calculate the metric with the correct denominator
The teaching file's completed revenue is 20 + 30 + 15 = 65. There are two distinct completed orders, O100 and O101. Average revenue per completed order is 65 divided by 2, which equals 32.50. Dividing by the three cleaned lines gives about 21.67 per line. That number is not wrong arithmetic; it answers a different question.
Ask for the numerator, denominator, filters and units for every rate or average. A conversion rate needs a definition of who was eligible and what counts as conversion. A per-customer value needs a distinct customer count within the same period and rules. Matching date windows matter just as much as correct division.
Do not count a repeated order total once per line. Some exports repeat the full order amount on each item row. In that case, summing the column would overstate revenue. The teaching example avoids that by defining amount as a line value. Your real dictionary must settle which kind of amount you have.
| Metric | Calculation | Teaching result |
|---|---|---|
| Raw rows | Count original rows | 5 |
| Clean completed lines | 5 − 1 duplicate − 1 cancelled | 3 |
| Completed orders | Distinct O100 and O101 | 2 |
| Completed revenue | 20 + 30 + 15 | 65.00 |
| Revenue per order | 65 ÷ 2 | 32.50 |
Request a calculation that can be rerun
When code-based analysis is available, ask for the code, filters and outputs used. If the workflow cannot run code, use a spreadsheet or another calculation tool and let ChatGPT explain the method. The important property is that someone can repeat the calculation and obtain the same result from the same data and rules.
For the teaching example, pseudocode is enough to show the method: read the file with identifiers as text; identify exact duplicate lines by the agreed key; keep one copy; select completed status; sum line amounts; count distinct order IDs; divide the sum by that count. A real file needs actual column names and parsing settings.
Distinguish suggested code from executed code. If a response gives a script, it has not necessarily run it. Ask what environment was used and inspect the relevant output if execution is claimed. A chart appearing in the conversation does not establish that the entire attached file was read.
Check one important result independently
For a small file, count and sum by hand. For a larger file, verify a decisive total and one meaningful group in a spreadsheet or another trusted calculation. Compare both the value and the record count. Two tools can produce the same total for different reasons, so keep filters and definitions alongside the number.
In the teaching example, inspect O100's two lines and confirm that their total is fifty. Inspect O101 and confirm that only one copy contributes fifteen. Then confirm O102 is excluded from completed revenue. This direct source check explains the total of sixty-five and the two-order denominator.
If your independent result differs, stop interpreting the findings. Compare import settings, duplicate rules, date filters, status filters and amount definitions. Do not average the two results or choose the one that looks more plausible. Resolve why they differ.
Choose a chart after the calculation is settled
A time chart needs dates in order and comparable periods. A category comparison needs the same definition for each category. A distribution needs individual values rather than only the overall average. Choose the chart that answers the question, then label units, time window and exclusions.
Be careful with a partial month. A month with only twelve recorded days should not be compared with a full prior month as though both cover the same time. Use equivalent windows or label the limitation. Check whether a sudden change coincides with a new data source or changed definition.
Separate what happened from why it happened. Higher revenue could reflect more orders, higher prices, a different mix of products or changed recording. The CSV may show the pattern without proving the cause. Ask what additional field or comparison would distinguish the possible explanations.
Repair wrong assumptions and deliver a usable finding
Suppose ChatGPT reports average order value as 21.67 in the teaching example. The repair is specific: Three is the count of completed lines, not orders. Count distinct order_id after cleaning, use two as the denominator and update any conclusion that used the wrong average. Keep the correct revenue total of sixty-five.
If it silently dropped blank rows, ask for the excluded-record list and a revised cleaning log. If it parsed a date incorrectly, repair the date format and rerun affected groups. Avoid rewriting the whole report when one assumption is wrong, but do update every calculation that depends on it.
Finish with the answer, supporting counts, rules and limitation. For this example: Completed revenue is 65 across two orders, averaging 32.50 per order; one duplicate line and one cancelled line were excluded under the stated rules. Keep the source and calculation with the result. That is a finding another person can inspect and reuse.
Check the result before you use it
- Does one row mean an order, a line, a person or an event?
- Were separators, decimal marks and dates read correctly?
- Do the cleaning log and excluded records explain every removed row?
- Does each rate use the intended population and time window?
- Can the decisive total be reproduced from the original rows?
Watch for: A chart can look correct while answering the wrong question. Establish row meaning and the denominator before interpreting the pattern.