Marthee commited on
Commit
465ad82
·
verified ·
1 Parent(s): 80fd469

Update Code_2_7.py

Browse files
Files changed (1) hide show
  1. Code_2_7.py +3 -30
Code_2_7.py CHANGED
@@ -1568,29 +1568,16 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
1568
  SimilarAreaDictionary.reset_index(drop=True, inplace=True)
1569
 
1570
 
1571
- # grouped_df = SimilarAreaDictionary.groupby('Color').agg({
1572
- # 'Occurences': 'sum', # Sum of occurrences for each color
1573
- # 'Area':'first',
1574
- # 'Total Area': 'sum', # Sum of areas for each color
1575
- # 'Perimeter':'first',
1576
- # 'Total Perimeter': 'sum', # Sum of perimeters for each color
1577
-
1578
- # }).reset_index()
1579
  grouped_df = SimilarAreaDictionary.groupby('Color').agg({
1580
- 'Guess':'first',
1581
  'Occurences': 'sum', # Sum of occurrences for each color
1582
  'Area':'first',
1583
  'Total Area': 'sum', # Sum of areas for each color
1584
  'Perimeter':'first',
1585
  'Total Perimeter': 'sum', # Sum of perimeters for each color
1586
- 'Length':'first',
1587
- 'Total Length':'first',
1588
- 'Texts':'first',
1589
- 'Comments':'first'
1590
-
1591
  }).reset_index()
1592
 
1593
- SimilarAreaDictionary = grouped_df
1594
  # Apply the unification function
1595
  # SimilarAreaDictionary = unify_colors(SimilarAreaDictionary)
1596
 
@@ -1632,18 +1619,4 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
1632
  print('LISTTT',list1)
1633
  return doc2,latestimg, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas
1634
 
1635
-
1636
-
1637
- # grouped_df = SimilarAreaDictionary.groupby('Color').agg({
1638
- # 'Guess':'first',
1639
- # 'Occurences': 'sum', # Sum of occurrences for each color
1640
- # 'Area':'first',
1641
- # 'Total Area': 'sum', # Sum of areas for each color
1642
- # 'Perimeter':'first',
1643
- # 'Total Perimeter': 'sum', # Sum of perimeters for each color
1644
- # 'Length':'first',
1645
- # 'Total Length':'first',
1646
- # 'Texts':'first',
1647
- # 'Comments':'first'
1648
-
1649
- # }).reset_index()
 
1568
  SimilarAreaDictionary.reset_index(drop=True, inplace=True)
1569
 
1570
 
 
 
 
 
 
 
 
 
1571
  grouped_df = SimilarAreaDictionary.groupby('Color').agg({
 
1572
  'Occurences': 'sum', # Sum of occurrences for each color
1573
  'Area':'first',
1574
  'Total Area': 'sum', # Sum of areas for each color
1575
  'Perimeter':'first',
1576
  'Total Perimeter': 'sum', # Sum of perimeters for each color
1577
+
 
 
 
 
1578
  }).reset_index()
1579
 
1580
+
1581
  # Apply the unification function
1582
  # SimilarAreaDictionary = unify_colors(SimilarAreaDictionary)
1583
 
 
1619
  print('LISTTT',list1)
1620
  return doc2,latestimg, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas
1621
 
1622
+