Stopped script from crashing if area is not included in the model dataset

This commit is contained in:
Hunter Nichols 2021-02-17 10:42:01 -08:00
parent ad1509b29b
commit 2ce802612b
1 changed files with 6 additions and 3 deletions

View File

@ -42,9 +42,12 @@ def get_data(file_name):
feature_names = row[0].split(',')
input_list = [[] for _ in range(len(feature_names)-removed_items)]
scaled_list = [[] for _ in range(len(feature_names)-removed_items)]
# Save to remove area
area_ind = feature_names.index('area')
try:
# Save to remove area
area_ind = feature_names.index('area')
except ValueError:
area_ind = -1
try:
process_ind = feature_names.index('process')
except: