Skip to Content
0 likes
Audit Rejected CSV Rows and Reconcile Every Input Record Level: Intermediate

Validate a defined spreadsheet-export contract, record rejected rows with reasons and line ranges, and reconcile accepted and rejected outputs without changing the source.

0 likes
Finding Files in Python With pathlib glob and rglob Level: Intermediate

glob() searches one folder, rglob() searches every folder below it. Neither sorts the results, skips folders like .venv, or matches .CSV on Linux. Add those yourself, and always do a dry run before deleting anything.

0 likes
Reading a Large Text File in Python Line by Line Level: Intermediate

for line in file reads one line at a time, so a 10 GB file uses almost no memory. read() and readlines() load everything. Count, filter and stop early without building a list, and read in blocks when there are no lines.