Skip to main content

A reusable starting point

Clean the CSV. Keep every change explainable.

Use this starter to clean a CSV under explicit rules while preserving the original. Apply only agreed transformations, keep ambiguous values visible, and reconcile row counts and totals. The fictional sample includes deliberate errors with a hand-checked expected result.

Start with $20 in included credits. See usage and plans.

Define the data rules before changing values

The sample treats record_id as text, amount as a decimal value in the stated currency, and event_date as an ISO date only when it is valid and unambiguous. The leading zeros in 001 and 002 are part of the identifier. Losing them during import is a change to the data even if the table still looks readable.

Keep the original file and write the result to a new name. Ask for the transformations and unresolved issues in a separate note. The goal is a reproducible cleaning pass, not a claim that the business data is complete or correct simply because it can be parsed.

Distinguish exact repeats from conflicting records

Two rows for 002 are byte-for-byte copies in the sample, so the stated rule allows one copy to be removed. That changes eight source rows into seven output rows. Trimming whitespace in customer_name changes the retained Birch Works value but should not create a new customer or alter its identifier.

Do not generalize this rule to duplicate IDs with different amounts, dates, or names. Those could represent corrections or distinct events, depending on the data model. If such a conflict appears in real input, preserve both source records in the issue register and ask for a resolution rule before deciding which is authoritative.

Keep blanks separate from zero

Record 003 has no email and record 004 has no amount. A missing amount is not zero; replacing it with zero would make arithmetic look complete while hiding the missing information. Keep the blank value and explain how it affects any total.

Validate what you can actually establish. An address ending in .example is fictional sample data, and a syntactically plausible address is not proof of deliverability or ownership. The task does not require contacting anyone, enriching identities, or guessing the missing address from a company name.

Reject impossible dates and preserve ambiguity

The date 09/06/2026 could mean September 6 or June 9. Without a declared locale, neither interpretation is justified. The string 2026-09-31 is invalid because September has thirty days. Mark both values as issues; do not silently convert either to a guessed date.

One workable output convention is to preserve event_date exactly and add normalized_event_date plus date_status. Valid ISO dates can be copied to the normalized field; ambiguous or invalid values leave it blank with the appropriate status. This keeps the evidence available while making downstream filtering safer.

Check row counts and money by currency

After the exact duplicate is removed, the sample has seven rows. The known numeric USD amounts sum to 330.00: 120, 80, 45, 60, and 25. One additional USD row has a blank amount. EUR totals 100.00 in its own currency. These are known-amount totals across retained rows, not revenue for a validated reporting period.

Do not combine USD and EUR without a specified conversion rate and date. Date problems also prevent confidently allocating all amounts to a calendar period. State the inclusion rule for totals and keep the missing amount visible next to the number so the reviewer does not mistake a partial total for a complete one.

Open the saved files and replay the explanation

Review the cleaned CSV itself, not only the Agent’s summary. Confirm the header, seven retained rows, text identifiers, unchanged original values, and added date columns. Open the issue note and verify that every deliberate error in the sample is represented. Check that the saved files exist before relying on a completion message.

If a processing step fails or the result cannot be opened, inspect the state before rerunning a workflow that might overwrite outputs. For the next real dataset, revise the cleaning contract and expected checks rather than assuming this sample’s rules fit it. Different uses may require preserving duplicates or excluding unresolved rows from downstream analysis.

Try it with a small example.

Sample files to try

Fictional inputs for this example. Download a file and add it to your Project to follow along.

  • data-cleaning-sample.csv

    Eight fictional rows with an exact duplicate, whitespace, blanks, two currencies, and two date issues.

Open Workspace

Copy, open a Session, and paste your prompt. It is not sent automatically.

Download the starter text

An illustrative result.

Fictional sample, written to show the expected structure. Your result depends on your inputs and needs review.

Fictional expected reconciliation

Source rows: 8. Retained rows: 7. Exact duplicates removed: 1 (record 002).
Whitespace: retained 002 customer_name becomes Birch Works.
Missing email: 003. Missing amount: 004; remains blank.
Date issues: 006 Ambiguous; 007 Invalid. Their normalized dates remain blank and original strings remain present.
Known amounts: USD 330.00, plus one unresolved USD amount; EUR 100.00. No combined currency total.
These totals include retained rows with date issues and are not validated totals for a reporting period.

Before you use the result.

  • Eight input rows reconcile to seven retained rows and one exact duplicate removal.
  • Leading zeros survive and the original file is unchanged.
  • The blank amount remains blank; no zero or email was invented.
  • Both date issues are visible and original date strings are preserved.
  • Known amounts are USD 330.00 and EUR 100.00, with the missing USD amount disclosed.

Common questions.

What can I bring into a Project?

Upload documents, spreadsheets, PDFs, images, and presentations, or attach files and paste images in a Session. Add Project instructions to explain the audience, preferred format, and facts the Agent should use.

More in the FAQ
Where do I find and review the finished files?

Open your Project’s Files tab or General → Files. In a Session, Preview opens a side panel where you can select a file. Use page, sheet, or slide controls where available, check the contents, and download the result.

More in the FAQ

Sources: Workspace guide: inspect and download files · FAQ: spreadsheet and Project inputs

Content reviewed against the Workspace Guide & FAQ. Features and access can depend on your account.