Skip to content

Commit

Permalink
Fix: check for 'area' column
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-griffen committed Nov 15, 2023
1 parent e2a12cc commit ae67f86
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hub/management/commands/generate_wi_groups_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ def process_data(self, df):

if not self._quiet:
self.stdout.write("Generating GSS codes for new WI groups")

df["area"] = df.progress_apply(
lambda row: self.process_lat_long(row.lat_lon, row.group_name)
if pd.isna(row.area)
else row.area,
if "area" not in row
else row["area"],
axis=1,
)
return df
Expand Down

0 comments on commit ae67f86

Please sign in to comment.