diff --git a/pipelines/utils/crawler_cgu/utils.py b/pipelines/utils/crawler_cgu/utils.py index 4360245c4..e1c418c3f 100644 --- a/pipelines/utils/crawler_cgu/utils.py +++ b/pipelines/utils/crawler_cgu/utils.py @@ -185,8 +185,11 @@ def download_file(dataset_id: str, table_id: str, year: int, month: int, relativ # Função para carregar o dataframe @lru_cache(maxsize=1) # Cache para evitar recarregar a tabela def load_municipio() -> None: - municipio : pd.DataFrame = bd.read_table( - "br_bd_diretorios_brasil", "municipio", billing_project_id="basedosdados-dev" + municipio: pd.DataFrame = bd.read_table( + "br_bd_diretorios_brasil", + "municipio", + billing_project_id="basedosdados-dev", + from_file=True, ) municipio["cidade_uf"] = ( municipio["nome"].apply(lambda x: x.upper()) + "-" + municipio["sigla_uf"] @@ -194,7 +197,6 @@ def load_municipio() -> None: return municipio - def get_similar_cities_process(city): municipio = load_municipio() results = process.extractOne(city, municipio["cidade_uf"], score_cutoff=70)