Spaces:
Sleeping
Sleeping
Update Code_2_7.py
Browse files- Code_2_7.py +16 -2
Code_2_7.py
CHANGED
|
@@ -1577,7 +1577,7 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
|
|
| 1577 |
|
| 1578 |
}).reset_index()
|
| 1579 |
|
| 1580 |
-
|
| 1581 |
# Apply the unification function
|
| 1582 |
# SimilarAreaDictionary = unify_colors(SimilarAreaDictionary)
|
| 1583 |
|
|
@@ -1619,4 +1619,18 @@ def mainFunctionDrawImgPdf(datadoc,dxfpath, dxfratio,SearchArray,pdfpath=0,pdfna
|
|
| 1619 |
print('LISTTT',list1)
|
| 1620 |
return doc2,latestimg, SimilarAreaDictionary ,spreadsheetId, spreadsheet_url , namepathArr , list1,hatched_areas
|
| 1621 |
|
| 1622 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1577 |
|
| 1578 |
}).reset_index()
|
| 1579 |
|
| 1580 |
+
SimilarAreaDictionary = grouped_df
|
| 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 |
+
|
| 1623 |
+
|
| 1624 |
+
# grouped_df = SimilarAreaDictionary.groupby('Color').agg({
|
| 1625 |
+
# 'Guess':'first',
|
| 1626 |
+
# 'Occurences': 'sum', # Sum of occurrences for each color
|
| 1627 |
+
# 'Area':'first',
|
| 1628 |
+
# 'Total Area': 'sum', # Sum of areas for each color
|
| 1629 |
+
# 'Perimeter':'first',
|
| 1630 |
+
# 'Total Perimeter': 'sum', # Sum of perimeters for each color
|
| 1631 |
+
# 'Length':'first',
|
| 1632 |
+
# 'Total Length':'first',
|
| 1633 |
+
# 'Texts':'first',
|
| 1634 |
+
# 'Comments':'first'
|
| 1635 |
+
|
| 1636 |
+
# }).reset_index()
|