Spaces:
Sleeping
Sleeping
Update Doors_Schedule.py
Browse files- Doors_Schedule.py +16 -6
Doors_Schedule.py
CHANGED
|
@@ -50,14 +50,24 @@ def search_columns(df):
|
|
| 50 |
|
| 51 |
# Define patterns
|
| 52 |
|
| 53 |
-
door_id_pattern = r'\b(?:door\s*)?(?:id|no|number)(?!-)\b'
|
| 54 |
-
door_type_pattern = r'^\s*(?:\S*\s+)?door\s*[\n\s]*type\s*$|^type\s*$'
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
width_pattern = r'^\s*width\s*(?:\n|\s)+.*$'
|
| 58 |
-
height_pattern = r'^\s*height\s*(?:\n|\s)+.*$'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
structural_opening_pattern = r'\b(?:Structural\s+opening|structural\s+opening)\b'
|
| 60 |
|
|
|
|
|
|
|
| 61 |
# Function to search in column names and return column indices
|
| 62 |
def find_column_indices(df, patterns):
|
| 63 |
matches = {}
|
|
|
|
| 50 |
|
| 51 |
# Define patterns
|
| 52 |
|
| 53 |
+
#door_id_pattern = r'\b(?:door\s*)?(?:id|no|number)(?!-)\b'
|
| 54 |
+
#door_type_pattern = r'^\s*(?:\S*\s+)?door\s*[\n\s]*type\s*$|^type\s*$'
|
| 55 |
+
##width_pattern = r'^\s*(?:WIDTH|Width|width)\s*$'
|
| 56 |
+
##height_pattern = r'^\s*(?:HEIGHT|Height|height)\s*$'
|
| 57 |
+
#width_pattern = r'^\s*width\s*(?:\n|\s)+.*$'
|
| 58 |
+
#height_pattern = r'^\s*height\s*(?:\n|\s)+.*$'
|
| 59 |
+
#structural_opening_pattern = r'\b(?:Structural\s+opening|structural\s+opening)\b'
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
door_id_pattern = r'\b(?:door\s*)?(?:id|no|number)\b|\bdoor\s*name\b'
|
| 64 |
+
door_type_pattern = r'(?i)\b(?:\S+\s+)?door\s*[\n\s]*type\b|\btype(?:\s+\w+)?\b'
|
| 65 |
+
width_pattern = r'(?i)\b[wW]\s*i\s*d\s*t\s*h\b[\s\n\t]*.*'
|
| 66 |
+
height_pattern = r'(?i)\b[hH]\s*e\s*i\s*g\s*h\s*t\b[\s\n\t]*.*'
|
| 67 |
structural_opening_pattern = r'\b(?:Structural\s+opening|structural\s+opening)\b'
|
| 68 |
|
| 69 |
+
|
| 70 |
+
|
| 71 |
# Function to search in column names and return column indices
|
| 72 |
def find_column_indices(df, patterns):
|
| 73 |
matches = {}
|