Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
034c561
1
Parent(s):
ea9bc33
Update imports_utils.py
Browse files- imports_utils.py +4 -7
imports_utils.py
CHANGED
@@ -176,7 +176,7 @@ def fetchSubdomainMapper (livabilityAttributePages):
|
|
176 |
|
177 |
def fetchDistanceMatrices (stream_distance_matrices):
|
178 |
|
179 |
-
nested_list = []
|
180 |
# navigate to list with speckle objects of interest
|
181 |
distance_matrices = {}
|
182 |
for distM in stream_distance_matrices["@Data"]['@{0}']:
|
@@ -187,13 +187,10 @@ def fetchDistanceMatrices (stream_distance_matrices):
|
|
187 |
origin_ids = distance_matrix_dict["origin_uuid"]
|
188 |
destination_ids = distance_matrix_dict["destination_uuid"]
|
189 |
distance_matrix = distance_matrix_dict["matrix"]
|
190 |
-
chunks = distance_matrix_dict["chunks"]
|
191 |
-
|
192 |
-
for row_obj in chunk['@rows']:
|
193 |
-
row = row_obj['@row']
|
194 |
-
nested_list.append(row)
|
195 |
# Convert the distance matrix to a DataFrame
|
196 |
-
df_distances = pd.DataFrame(
|
197 |
|
198 |
# i want to add the index & colum names to dist_m_csv
|
199 |
#distance_matrices[kk] = dist_m_csv[kk]
|
|
|
176 |
|
177 |
def fetchDistanceMatrices (stream_distance_matrices):
|
178 |
|
179 |
+
#nested_list = []
|
180 |
# navigate to list with speckle objects of interest
|
181 |
distance_matrices = {}
|
182 |
for distM in stream_distance_matrices["@Data"]['@{0}']:
|
|
|
187 |
origin_ids = distance_matrix_dict["origin_uuid"]
|
188 |
destination_ids = distance_matrix_dict["destination_uuid"]
|
189 |
distance_matrix = distance_matrix_dict["matrix"]
|
190 |
+
#chunks = distance_matrix_dict["chunks"]
|
191 |
+
|
|
|
|
|
|
|
192 |
# Convert the distance matrix to a DataFrame
|
193 |
+
df_distances = pd.DataFrame(distance_matrix, index=origin_ids, columns=destination_ids)
|
194 |
|
195 |
# i want to add the index & colum names to dist_m_csv
|
196 |
#distance_matrices[kk] = dist_m_csv[kk]
|