fix: convert NaN/NULL to None and restore record properties structure in tap.py
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m2s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 12s
PR Checks / Build Frontend (no push) (pull_request) Successful in 42s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 47s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 1m46s
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m2s
PR Checks / Backend Smoke (pull_request) Successful in 7s
PR Checks / Build Backend (no push) (pull_request) Successful in 12s
PR Checks / Build Frontend (no push) (pull_request) Successful in 42s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 47s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 1m46s
This commit is contained in:
@@ -237,18 +237,15 @@ class OfstedInspectionsStream(Stream):
|
|||||||
|
|
||||||
for _, row in df.iterrows():
|
for _, row in df.iterrows():
|
||||||
record = {}
|
record = {}
|
||||||
for key in self.schema["properties"].keys():
|
|
||||||
record[key] = None
|
|
||||||
|
|
||||||
for field, col in col_map.items():
|
for field, col in col_map.items():
|
||||||
val = row.get(col, None)
|
val = row.get(col, None)
|
||||||
if val == 'NULL':
|
if pd.isna(val) or val == 'NULL':
|
||||||
val = None
|
val = None
|
||||||
record[field] = val
|
record[field] = val
|
||||||
|
|
||||||
# Cast URN
|
# Cast URN
|
||||||
try:
|
try:
|
||||||
record["urn"] = int(record["urn"])
|
record["urn"] = int(record.get("urn"))
|
||||||
except (ValueError, KeyError, TypeError):
|
except (ValueError, KeyError, TypeError):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user