From 6ba1c42417f1358759f4363db323a0f102355d99 Mon Sep 17 00:00:00 2001 From: Tudor Date: Tue, 24 Mar 2026 20:55:27 +0000 Subject: [PATCH] fix(ofsted): skip title row with header=1 when reading CSV The Ofsted MI CSV has a descriptive title on row 0; real column headers are on row 1. Co-Authored-By: Claude Sonnet 4.6 --- integrator/scripts/sources/ofsted.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integrator/scripts/sources/ofsted.py b/integrator/scripts/sources/ofsted.py index 924c5e2..800ad81 100644 --- a/integrator/scripts/sources/ofsted.py +++ b/integrator/scripts/sources/ofsted.py @@ -137,9 +137,9 @@ def load(path: Path | None = None, data_dir: Path | None = None) -> dict: if not csv_names: raise ValueError("No CSV found inside Ofsted ZIP") with z.open(csv_names[0]) as f: - df = pd.read_csv(io.TextIOWrapper(f, encoding="latin-1"), low_memory=False) + df = pd.read_csv(io.TextIOWrapper(f, encoding="latin-1"), low_memory=False, header=1) else: - df = pd.read_csv(path, encoding="latin-1", low_memory=False) + df = pd.read_csv(path, encoding="latin-1", low_memory=False, header=1) # Normalise column names df.rename(columns=COLUMN_MAP, inplace=True)