Free build-along · Fictional business example

Can a simple Python script become a service someone pays for?

Use this CSV cleanup project to learn the workflow, frame a narrow offer, and test whether a real customer wants it. The example code is free. No email is required.

First, identify a real problem

A local business might export orders to a CSV every week and find inconsistent email casing, duplicate IDs, or invalid amounts. That is a hypothetical pain point, not proof of demand. Ask potential customers about their actual workflow before proposing a solution.

Example deliverable: a reproducible process that produces a clean accepted.csv and an explicit review.csv—never silently deleting questionable records.

1. Run the free workflow

Download the self-contained Python script and fictional input file. It uses only the standard library and never uploads anything to a server.

Download Python script Download sample CSV

python csv-cleanup-demo.py sample-orders.csv output

Expected terminal result: Accepted: 2; needs review: 3. The output directory will contain accepted.csv and review.csv. Running it again produces the same files. Read the script to see how it handles duplicate IDs, missing fields, and invalid totals.

Understand the checks

The script trims fields, lowercases email addresses, accepts the first valid occurrence of an order ID, and sends later duplicates to review. Amounts must be nonnegative whole cents. The email check catches only obvious formatting problems; it does not verify an address exists. Review files may contain untrusted spreadsheet formulas: inspect them as plain text, not by opening them directly in Excel.

Troubleshooting and practice

Use Python 3.10 or newer. If the input is not found, run the command in the download folder or provide its full path. A column error means the file does not match this example schema. Each run replaces the two output files; keep an original backup and choose a separate output folder.

Exercise: add a unique order with total_cents set to 0. Expect three accepted records. Then change that amount to 12.50: it should move to review. Compare both output files, not just the terminal counts. See the official csv documentation.

2. Turn the technical result into a narrowly defined offer

What to promise

Process a well-defined export with agreed rules, produce inspectable results, explain rejected rows, and deliver a short handover.

What not to promise

Perfect cleaning, arbitrary spreadsheet support, guaranteed business savings, or safe processing of personal information without appropriate controls.

3. Validate the offer before building more

Speak with a few relevant people, ask how they currently detect bad rows, and offer to demonstrate a synthetic or properly authorized sample. Confirm their expected outputs, pricing constraints, data permissions, and what would count as a successful paid pilot. Do not call the project a business success until someone actually buys it.

Your free one-page scope worksheet

Write down the buyer, problem, deliverables, acceptance tests, privacy boundaries, and a small organic experiment.

Download business-offer worksheet

4. Put your work in front of people organically

Publish a helpful demonstration for a precise search query, share it where its intended readers actively ask related questions, and invite useful feedback—not unsolicited marketing. Link your tutorial to your portfolio or a relevant offer, then measure qualified conversations and actual purchases separately.

You can also study the CSV cleaning guide, reading and writing CSV in Python, or the free learning hub.

Optional next step · Paid education

Want the complete build-to-business process?

Python to Profit covers finding a reachable customer, validating an offer, building the useful core with Python and Codex, and planning how to sell and deliver it. Course access is a $49 USD one-time purchase. The expanded premium narrated video edition is still being finalized; released lessons and practical materials are available now. No earnings are guaranteed.

Explore $49 course checkout ↗ Watch Lesson 1 free Read the full curriculum first

Payhip handles checkout. Taxes, where applicable, may be added. This free article remains available without purchase.