Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -78,6 +78,8 @@ else:
|
|
78 |
df_lu = df_lu.set_index("ids", drop=False)
|
79 |
|
80 |
df_dm = matrices[distanceMatrixActivityNodes]
|
|
|
|
|
81 |
df_dm = df_dm.apply(pd.to_numeric, errors='coerce')
|
82 |
df_dm = df_dm.round(0).astype(int)
|
83 |
|
|
|
78 |
df_lu = df_lu.set_index("ids", drop=False)
|
79 |
|
80 |
df_dm = matrices[distanceMatrixActivityNodes]
|
81 |
+
# Replace infinity with 10000 and NaN values with 0, then convert to integers
|
82 |
+
dfLanduses = dfLanduses.replace([np.inf, -np.inf], 10000).fillna(0)
|
83 |
df_dm = df_dm.apply(pd.to_numeric, errors='coerce')
|
84 |
df_dm = df_dm.round(0).astype(int)
|
85 |
|