From 36ca61cd1758ca7825d13b810d159640f4b7eb13 Mon Sep 17 00:00:00 2001 From: Biel Stela Date: Thu, 23 May 2024 15:43:11 +0200 Subject: [PATCH] Remove unneded comment in module docstring and drop_duplicates since dupes come from a source higher up in the food chain --- .../indicator_coefficient_importer.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/data/indicator_coefficient_importer/indicator_coefficient_importer.py b/data/indicator_coefficient_importer/indicator_coefficient_importer.py index a82572737..a79286999 100644 --- a/data/indicator_coefficient_importer/indicator_coefficient_importer.py +++ b/data/indicator_coefficient_importer/indicator_coefficient_importer.py @@ -8,14 +8,6 @@ - API_POSTGRES_USER - API_POSTGRES_PASSWORD - API_POSTGRES_DATABASE - -Usage: - indicator_coefficient_importer.py - -Arguments: - Path to the csv file with the indicator coefficient data. - Indicator code to link the indicator coefficient data. - Year of the data used. """ import logging @@ -122,7 +114,6 @@ def main(file: Path, indicator_code: str, year: int): data = pd.merge(data, admin_region_ids, on="country", how="left") data = pd.merge(data, material_ids, on="hs_2017_code", how="left") data["indicatorId"] = indicator_id - data = data.drop_duplicates(subset=["value", "year", "adminRegionId", "indicatorId", "materialId"]) data_to_insert = data[["value", "year", "adminRegionId", "indicatorId", "materialId"]] copy_data_to_table(conn, data_to_insert, indicator_id) postgres_thread_pool.putconn(conn, close=True)