(20260225) Tried fuzzy logic for hierarchy inference.

This commit is contained in:
2026-02-25 13:58:17 +05:30
parent 8b1818f827
commit c3ab2e4d9a
+14
View File
@@ -277,6 +277,20 @@ class CosecWeb:
# Simple file read: # Simple file read:
df = pd.read_excel(file_path) 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: # Drop junk rows, rename the columns:
df = df[3:] # ............... drop the co. name and other info df = df[3:] # ............... drop the co. name and other info
new_header = df.iloc[0] # ... extract the desired header new_header = df.iloc[0] # ... extract the desired header