From 1df7fd4217f01f0d8d0504a763820d35f1d0089d Mon Sep 17 00:00:00 2001 From: woodac Date: Fri, 8 Nov 2024 11:52:53 +0000 Subject: [PATCH] Updating code for Python 3.11 --- src/user_config.yaml | 4 ++-- src/utils/local_file_mods.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/user_config.yaml b/src/user_config.yaml index 0dd3d646a..b8ec1064c 100644 --- a/src/user_config.yaml +++ b/src/user_config.yaml @@ -115,10 +115,10 @@ hdfs_paths: civil_defence_detailed_mapper_path: "civil_defence_detailed_2022.csv" sic_division_detailed_mapper_path: "sic_div_detailed_2022.csv" 2023_mappers: - mappers_version: "v1" + mappers_version: "v2" postcode_mapper: "postcodes_2023.csv" itl_mapper_path: "itl_2023.csv" - ultfoc_mapper_path: "BERD_2023_ultfoc_anon.csv" + ultfoc_mapper_path: "BERD_2023_ultfoc.csv" cellno_path: 'BERD_2023_cellno_coverage.csv' pg_num_alpha_mapper_path: 'pg_num_alpha_2023.csv' sic_pg_alpha_mapper_path: 'sic_pg_alpha_2023.csv' diff --git a/src/utils/local_file_mods.py b/src/utils/local_file_mods.py index 2cd545194..285965c55 100644 --- a/src/utils/local_file_mods.py +++ b/src/utils/local_file_mods.py @@ -44,7 +44,7 @@ def rd_read_csv(filepath: str, **kwargs) -> pd.DataFrame: # Read the scv file using the path and keyword arguments try: - df = pd.read_csv(file, **kwargs) + df = pd.read_csv(file, **kwargs, low_memory=False) except Exception: LocalModLogger.error(f"Could not read specified file: {filepath}") if kwargs: