nastasiasnk commited on
Commit
fdcef48
1 Parent(s): d77dbe7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -157,11 +157,13 @@ def test(input_json):
157
  df_landuses = df_landuses.round(0).astype(int)
158
 
159
 
 
160
 
161
  # List containing the substrings to check against
162
  tranportModes = ["DRT", "GMT", "HSR"]
163
-
164
- def split_dict_by_subkey(original_dict, substrings):
 
165
  result_dicts = {substring: {} for substring in substrings}
166
 
167
  for key, nested_dict in original_dict.items():
@@ -174,7 +176,8 @@ def test(input_json):
174
 
175
  return result_dicts
176
 
177
- result_dicts = split_dict_by_subkey(df_dm_transport, tranportModes)
 
178
 
179
  # Accessing each dictionary
180
  art_dict = result_dicts["DRT"]
 
157
  df_landuses = df_landuses.round(0).astype(int)
158
 
159
 
160
+ from imports_utils import splitDictByStrFragmentInColumnName
161
 
162
  # List containing the substrings to check against
163
  tranportModes = ["DRT", "GMT", "HSR"]
164
+
165
+ """
166
+ def splitDictByStrFragmentInColumnName(original_dict, substrings):
167
  result_dicts = {substring: {} for substring in substrings}
168
 
169
  for key, nested_dict in original_dict.items():
 
176
 
177
  return result_dicts
178
 
179
+ """
180
+ result_dicts = splitDictByStrFragmentInColumnName(df_dm_transport_dictionary, tranportModes)
181
 
182
  # Accessing each dictionary
183
  art_dict = result_dicts["DRT"]