Get your API key

Lesson 4 of 5

Clean it into Google Sheets

Fix web-specific mess (currency text, star words, duplicates), keep a raw copy, import into Sheets, and use IMPORTHTML for simple tables.

8 min Log in to open

This course is general information for learning, not legal advice. For business use of collected data, ask a lawyer.

One step at a time, like flipping pages.

By the end of this lesson your 60 scraped books will be a clean Google Sheet you can trust, with a raw copy kept safe, one value per cell, and a note saying where the data came from.

You need: books_raw.csv from the last lesson, your coding agent, and Google Sheets · Time: 8 minutes

  1. Never clean the only copy. Keep books_raw.csv exactly as the scraper saved it, and make a new clean file from it. In Google Sheets you will have two tabs: raw and clean.

    A Google Sheet called books_clean with columns title, price_gbp, rating, in_stock, source_url and collected_on. Rows: A Light in the Attic, 51.77, 3, yes, .../page-1.html, 19/11/2026; Tipping the Velvet, 53.74, 1; Soumission, 50.10, 1; Sharp Objects, 47.82, 4. Below, two tabs: raw and clean. A note says the raw tab is the untouched copy and the clean tab is what you analyse.
    One row per book, one value per cell, and two columns that say where and when.
    Why?

    If a cleaning step goes wrong, you start again from the raw copy in seconds. Without it, you'd have to scrape the site again, which costs the site and you.

Log in free to read the rest of this lesson

Every lesson is free. A free account unlocks all of them and saves your progress.

Still to come in this lesson:

  1. Mess that only web data has
  2. Let the agent write the cleaning script
  3. Bring it into Google Sheets
  4. Check before you trust it, and label it
  5. Recap