Skip to content

Instantly share code, notes, and snippets.

View richardadalton's full-sized avatar

Richard Dalton richardadalton

View GitHub Profile
@richardadalton
richardadalton / gist:88348729d45d160168ecd5d55a309ce7
Created December 9, 2025 20:13
Use csv DictReader and DictWriter to read, and write a csv files, dropping rows with missing data.
import csv
IN_PATH = "values.csv"
OUT_PATH = "values_cleaned.csv"
def is_number(s: str) -> bool:
try:
float(s)
return True
except ValueError: