bugfix
This commit is contained in:
@@ -9144,6 +9144,23 @@ class DataProcessor:
|
||||
branche_col_internal = "branche_ki" # Name der Spalte mit den Detail-Branchen
|
||||
self.logger.info(f"Verarbeite kategoriales Feature '{branche_col_internal}' und mappe es zu 'Branchen_Gruppe'...")
|
||||
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# +++ FINALER DEBUGGING-BLOCK ZUR PRÜFUNG DES MAPPING-DICTIONARIES ++++++
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
self.logger.info(f"PRÜFE MAPPING-DICT: Das BRANCH_MAPPING Dictionary hat {len(BRANCH_MAPPING)} Einträge.")
|
||||
if len(BRANCH_MAPPING) < 5:
|
||||
self.logger.error("ALARM: Das BRANCH_MAPPING Dictionary ist fast oder komplett leer! Das Laden der Branchen.csv ist fehlgeschlagen.")
|
||||
else:
|
||||
# Zeige die ersten 5 Schlüssel-Wert-Paare aus dem Dictionary, um zu sehen, ob es korrekt ist.
|
||||
self.logger.info("PRÜFE MAPPING-DICT: Die ersten 5 Einträge sind:")
|
||||
for i, (key, value) in enumerate(BRANCH_MAPPING.items()):
|
||||
if i >= 5: break
|
||||
self.logger.info(f" -> Key: '{key}' -> Value: '{value}'")
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
# +++ ENDE FINALER DEBUGGING-BLOCK ++++++++++++++++++++++++++++++++++++++
|
||||
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
normalized_sheet_branches = df_filtered[branche_col_internal].apply(normalize_for_mapping)
|
||||
|
||||
if branche_col_internal not in df_filtered.columns:
|
||||
|
||||
Reference in New Issue
Block a user