Commit 4491d9aa authored by Danijel Schorlemmer's avatar Danijel Schorlemmer
Browse files

Update Fragility_to_Dictionary.py

parent 7d271847
......@@ -20,9 +20,9 @@ def Taxonomy_to_Fragility(gmDict, taxonomyToFragilitySource, fragilityFileDir):
taxonomyToFragilityMap = {}
for mappingItem in taxonomyToFragilitySource:
data = list(csv.reader(open(fragilities_path + "/" + mappingItem[1] + ".csv")))
fragilityFunction = list(csv.reader(open(fragilities_path + "/" + mappingItem[1] + ".csv")))
if mappingItem[0] in taxonomyToFragilityMap:
# implement your duplicate row handling here
pass
taxonomyToFragilityMap[mappingItem[0]] = [mappingItem[1], gmDict[data[0][0]]]
taxonomyToFragilityMap[mappingItem[0]] = [mappingItem[1], gmDict[fragilityFunction[0][0]]]
return(taxonomyToFragilityMap)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment