nastasiasnk commited on
Commit
79bcc66
1 Parent(s): 5b343bd

Update imports_utils.py

Browse files
Files changed (1) hide show
  1. imports_utils.py +1 -1
imports_utils.py CHANGED
@@ -248,7 +248,7 @@ def landusesToSubdomains(DistanceMatrix, LanduseDf, LanduseToSubdomainDict, Uniq
248
  for lu, lu_subdomain in LanduseToSubdomainDict.items():
249
  if lu_subdomain == subdomain:
250
  if lu in LanduseDf.columns:
251
- if LanduseDf[lu] is not None:
252
  df_LivabilitySubdomainsArea[subdomain] = df_LivabilitySubdomainsArea[subdomain].add(LanduseDf[lu], fill_value=0)
253
  else:
254
  print(f"Warning: Column '{lu}' not found in landuse database")
 
248
  for lu, lu_subdomain in LanduseToSubdomainDict.items():
249
  if lu_subdomain == subdomain:
250
  if lu in LanduseDf.columns:
251
+ if LanduseDf[lu].notna().any():
252
  df_LivabilitySubdomainsArea[subdomain] = df_LivabilitySubdomainsArea[subdomain].add(LanduseDf[lu], fill_value=0)
253
  else:
254
  print(f"Warning: Column '{lu}' not found in landuse database")