(20260225) Tried fuzzy logic for hierarchy inference.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user