Week 6 • Thursday

Block 58: Saving & Processing Scraped Data

Clean and store scraped data for downstream analysis.

Concepts

Code Examples

See exercise below.

Exercise

Scrape a simple sports or financial table. Clean it and compute one meaningful stat (e.g., average). Save both the raw HTML and the cleaned CSV with timestamps.

Homework

What encoding issues can arise in scraped text? How does .encode('utf-8', errors='ignore') help? Friday