From c3ab2e4d9a181ad514538ec6a1073e8a08b8a393 Mon Sep 17 00:00:00 2001 From: Khushal P Soonderji Date: Wed, 25 Feb 2026 13:58:17 +0530 Subject: [PATCH] (20260225) Tried fuzzy logic for hierarchy inference. --- cosec_web/cosec_web.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cosec_web/cosec_web.py b/cosec_web/cosec_web.py index c768330..cfdd28b 100644 --- a/cosec_web/cosec_web.py +++ b/cosec_web/cosec_web.py @@ -277,6 +277,20 @@ class CosecWeb: # Simple file read: df = pd.read_excel(file_path) + # Safety rename in case the column names change in the future: + df = df.rename( + columns = { + "User ID": "User ID", + "User Name": "User Name", + "Category Name": "Category Name", + "Grade Name": "Grade Name", + "Branch Name": "Branch Name", + "Department Name": "Department Name", + "Direct Reporting": "Direct Reporting", + "Level-1": "Level-1" + } + ) + # Drop junk rows, rename the columns: df = df[3:] # ............... drop the co. name and other info new_header = df.iloc[0] # ... extract the desired header