Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
e1ff7af
1
Parent(s):
e4cab2d
Update imports_utils.py
Browse files- imports_utils.py +5 -5
imports_utils.py
CHANGED
@@ -247,11 +247,11 @@ def landusesToSubdomains(DistanceMatrix, LanduseDf, LanduseToSubdomainDict, Uniq
|
|
247 |
for subdomain in UniqueSubdomainsList:
|
248 |
for lu, lu_subdomain in LanduseToSubdomainDict.items():
|
249 |
if lu_subdomain == subdomain:
|
250 |
-
if
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
|
256 |
return df_LivabilitySubdomainsArea
|
257 |
|
|
|
247 |
for subdomain in UniqueSubdomainsList:
|
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")
|
255 |
|
256 |
return df_LivabilitySubdomainsArea
|
257 |
|