Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
0f28441
1
Parent(s):
af1b241
Update imports_utils.py
Browse files- imports_utils.py +1 -16
imports_utils.py
CHANGED
@@ -199,7 +199,7 @@ def getDataFromSpeckle(
|
|
199 |
|
200 |
if type(landuseColumns) == type("s"):
|
201 |
# extract landuse columns with "landuseColumns"
|
202 |
-
landuse_columns = []
|
203 |
for name in df_lu.columns:
|
204 |
if name.startswith(landuseColumns):
|
205 |
landuse_columns.append(name)
|
@@ -211,21 +211,6 @@ def getDataFromSpeckle(
|
|
211 |
dfLanduses_filtered = df_lu[landuse_columns]
|
212 |
dfLanduses_filtered.columns = [col.replace('lu+', '') for col in df_lu_filtered.columns]
|
213 |
|
214 |
-
"""
|
215 |
-
|
216 |
-
if mergeAssetWithNonAssetLanduse:
|
217 |
-
df_lu_filtered.columns = [col.replace('ASSETS+', '') for col in df_lu_filtered.columns]
|
218 |
-
|
219 |
-
df_lu_filtered = df_lu_filtered.replace([np.inf, -np.inf], 10000).fillna(0)
|
220 |
-
df_lu_filtered = df_lu_filtered.apply(pd.to_numeric, errors='coerce')
|
221 |
-
df_lu_filtered = df_lu_filtered.astype(int)
|
222 |
-
df_lu_filtered = df_lu_filtered.T.groupby(level=0).sum().T
|
223 |
-
"""
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
# -------------------------- stream matrices ------------------------------ #
|
228 |
-
|
229 |
|
230 |
if matrixBranchName:
|
231 |
streamObj = speckle_utils.getSpeckleStream(streamId,dmBranchName,CLIENT, dmCommitId)
|
|
|
199 |
|
200 |
if type(landuseColumns) == type("s"):
|
201 |
# extract landuse columns with "landuseColumns"
|
202 |
+
landuse_columns = []
|
203 |
for name in df_lu.columns:
|
204 |
if name.startswith(landuseColumns):
|
205 |
landuse_columns.append(name)
|
|
|
211 |
dfLanduses_filtered = df_lu[landuse_columns]
|
212 |
dfLanduses_filtered.columns = [col.replace('lu+', '') for col in df_lu_filtered.columns]
|
213 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
|
215 |
if matrixBranchName:
|
216 |
streamObj = speckle_utils.getSpeckleStream(streamId,dmBranchName,CLIENT, dmCommitId)
|