From 48b74cc82d8d619c125c68775f5a9d67b9bae861 Mon Sep 17 00:00:00 2001 From: "Ronaldo S.A. Batista" Date: Sat, 24 Feb 2024 16:29:55 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Dictionary=20keys=20not=20change?= =?UTF-8?q?d=20in=20all=20places?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extracao/location.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extracao/location.py b/extracao/location.py index eed3f78..3d876e4 100644 --- a/extracao/location.py +++ b/extracao/location.py @@ -169,7 +169,7 @@ def log(self) -> Dict[str, pd.Series]: def fill_missing_coords(self) -> None: """Fill the missing coordinates with the central coordinates of the city from IBGE""" rows = self.log['empty_coords'] - rows &= self.log['city_and_uf_normalized'] + rows &= self.log['city_normalized'] self.log.update({'filled_city_coords': rows}) self.df.loc[rows, 'Latitude'] = self.df.loc[rows, 'Latitude_IBGE'] self.df.loc[rows, 'Longitude'] = self.df.loc[rows, 'Longitude_IBGE'] @@ -177,9 +177,8 @@ def fill_missing_coords(self) -> None: def normalize_location_names(self) -> None: rows = self.df['Latitude_IBGE'].notna() rows &= self.df['Longitude_IBGE'].notna() - self.log.update({'city_and_uf_normalized': rows}) + self.log.update({'city_normalized': rows}) self.df.loc[rows, 'MunicĂ­pio'] = self.df.loc[rows, 'MunicĂ­pio_IBGE'] - self.df.loc[rows, 'UF'] = self.df.loc[rows, 'UF_IBGE'] def drop_rows_without_location_info(self) -> None: rows = self.log['both']