RelayVano

← All postcards

Learning Python for Friday’s CSV Cleanup

Field trips EN

Imagine your team needs a small job finished by Friday: clean a spreadsheet export, remove duplicate email addresses, and save the result. You decide to use Python, a language you have never written before. An AI assistant can shorten the distance between that blank file and a working program—but only if you use it to learn, not just to collect code.

The useful idea is simple: let AI explain, demonstrate, and review while you remain responsible for predicting what the program will do.

A CSV cleanup task gives your learning a finish line

A CSV file stores rows of data as plain text, with values usually separated by commas. Cleaning one is a manageable first project because you can inspect both the input and the result.

Define a small target: read a file with name and email columns, ignore rows with empty email addresses, remove repeated addresses, and write a new file. Leave databases, websites, and deployment for another day.

Start with this prompt: “I am learning Python. Help me build a CSV cleanup script in small steps. Explain new terms, ask me to make predictions, and do not give me the complete solution unless I request it.”

A working Python setup comes before generated code

Ask the assistant for installation instructions specific to your operating system. Tell it whether you use Windows, macOS, or Linux, and whether you already have a text editor.

Have it show you how to check the installed Python version, create a file, and run a program that prints a short message. Command names can differ between systems, so share the exact error if an instruction fails.

For this project, request Python’s built-in csv module. A module is reusable code you can load into your program. Using a built-in one avoids extra package installation while you learn the basics.

One small program teaches five useful concepts

Ask for one short exercise at a time, using the cleanup task as context:

  • Variables: store a filename and print its value.
  • Lists: collect three example email addresses.
  • Loops: print each address on a separate line.
  • Conditions: skip an empty address.
  • Functions: group the cleanup logic into a reusable operation.

Before running each example, write down the output you expect. Afterwards, explain any difference in your own words. This makes an AI response something you test rather than something you trust automatically.

If you already know another language, ask for a comparison with a familiar concept. Also ask where that comparison breaks down: similar-looking features do not always behave identically.

Useful AI prompts ask for feedback, not replacement

When you get stuck, paste the smallest relevant code sample and the full error message. Remove passwords, API keys, customer records, and other private information first.

Try: “Explain this error in plain English. Give me one hint before suggesting a fix.” For review, ask: “Find one correctness problem and one readability improvement. Explain both without rewriting the whole file.”

For a convenient way to access AI while practicing, RelayVano is a pay-as-you-go relay that works with tools such as Claude Code and OpenAI-compatible SDKs. Sign up for RelayVano if you want that access for your learning sessions, and keep requests focused so usage stays intentional.

Five test rows reveal more than a polished answer

Create a tiny input file containing a normal address, an empty address, a repeated address, an address with surrounding spaces, and an address containing uppercase letters.

Decide the cleanup rules before asking for code. Should surrounding spaces disappear? Should uppercase and lowercase versions count as duplicates? For this exercise, you might choose both rules, but do not mistake that choice for a universal email-handling policy.

Write down the expected output, then compare it with the generated file. AI can suggest tests, but your requirements determine whether the result is correct.

Friday’s final check happens without the assistant

Close the chat and rebuild one small part from memory. Then explain how a row moves through the program, what happens when the file is missing, and which behavior you would change next.

If you cannot explain something, return with that specific question. The fastest useful progress is not producing the most code. It is reaching the point where you can change, test, and repair a small program yourself.

More postcards from this route