From 5a8df0f1c1f39597a6ce96d7fe5645a77a1a70c5 Mon Sep 17 00:00:00 2001 From: qloridant Date: Thu, 23 Jan 2025 17:57:22 +0100 Subject: [PATCH] fix: Replace ';' by '' toi avoid syntax conflicts --- data/etl/extractor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/etl/extractor.py b/data/etl/extractor.py index e001c3e90..2f6006561 100644 --- a/data/etl/extractor.py +++ b/data/etl/extractor.py @@ -60,7 +60,7 @@ def clean_dataset(self): # --------------------------------------------------- self.df = self.df[columns_to_keep] self.filter_dataframe_with_schema_cols() - self.df = self.df.replace({"\n": " ", "\r": " "}, regex=True) + self.df = self.df.replace({"\n": " ", "\r": " ", ";": ""}, regex=True) def is_valid(self) -> bool: files = prepare_file_validata_post_request(self.df) @@ -99,7 +99,7 @@ class DECLARATIONS(EXTRACTOR): def __init__(self): super().__init__() self.dataset_name = "declarations" - self.schema = json.load(open("data/schemas/schema_declarations.json"))["schema"] + self.schema = json.load(open("data/schemas/schema_declarations.json")) self.schema_url = ( "https://github.com/betagouv/complements-alimentaires/blob/staging/data/schemas/schema_declarations.json" )