Marthee commited on
Commit
7eefff8
·
verified ·
1 Parent(s): b2efd1c

Update google_sheet_Legend.py

Browse files
Files changed (1) hide show
  1. google_sheet_Legend.py +4 -1
google_sheet_Legend.py CHANGED
@@ -525,17 +525,20 @@ def deletefromlegend(deletedrows,SimilarAreaDictionarycopy,section, areaPermArr=
525
  areaPermArr=ast.literal_eval(areaPermArr)
526
  myDict=eval(SimilarAreaDictionarycopy)
527
  SimilarAreaDictionarycopy=pd.DataFrame(myDict)
 
528
  strings=deletedrows['content']
529
  areastodelete = []
530
  perimstodelete=[]
531
  lengthstodelete=[]
532
- print('areaPermArr',areaPermArr)
 
533
  for item in strings:
534
  items.append(str(item).split('\n \n'))
535
  # print('itemsssssss',float(re.findall("\d+\.\d+", str(items[i][0]).split()[0])[0])) #take area and perim mn hna l sec 3.2 and +/- value margin
536
 
537
  for i in range(len(items)):
538
  print('ITEMSS',str(items[i]).split())
 
539
  areastodelete.append(float(re.findall("\d+\.\d+", str(items[i][0]).split()[1])[0]))
540
  perimstodelete.append(float(re.findall("\d+\.\d+", str(items[i][1]).split()[1])[0]) )
541
  lengthstodelete.append(float(re.findall("\d+\.\d+", str(items[i][2]).split()[1])[0]) )
 
525
  areaPermArr=ast.literal_eval(areaPermArr)
526
  myDict=eval(SimilarAreaDictionarycopy)
527
  SimilarAreaDictionarycopy=pd.DataFrame(myDict)
528
+ # deletedrows=eval(deletedrows)
529
  strings=deletedrows['content']
530
  areastodelete = []
531
  perimstodelete=[]
532
  lengthstodelete=[]
533
+
534
+
535
  for item in strings:
536
  items.append(str(item).split('\n \n'))
537
  # print('itemsssssss',float(re.findall("\d+\.\d+", str(items[i][0]).split()[0])[0])) #take area and perim mn hna l sec 3.2 and +/- value margin
538
 
539
  for i in range(len(items)):
540
  print('ITEMSS',str(items[i]).split())
541
+ items=ast.literal_eval(str(items[i]))
542
  areastodelete.append(float(re.findall("\d+\.\d+", str(items[i][0]).split()[1])[0]))
543
  perimstodelete.append(float(re.findall("\d+\.\d+", str(items[i][1]).split()[1])[0]) )
544
  lengthstodelete.append(float(re.findall("\d+\.\d+", str(items[i][2]).split()[1])[0]) )