mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
28 lines
798 B
Python
28 lines
798 B
Python
"""
|
|
Simple script to tidy up the unitas asset list
|
|
"""
|
|
import pandas as pd
|
|
|
|
df = pd.read_excel(
|
|
"/Users/khalimconn-kowlessar/Documents/hestia/Customers/Unitas/UNITAS - Asset List.xlsx",
|
|
sheet_name="Asset List"
|
|
)
|
|
df["Warmfront Finding"] = df["Warmfront Finding"].str.lower().str.strip()
|
|
|
|
mapping = pd.read_csv(
|
|
"/Users/khalimconn-kowlessar/Documents/hestia/Customers/Unitas/unitas-mapped-categories.csv",
|
|
)
|
|
|
|
al = df.merge(
|
|
mapping[["non-intrusives: WFT Findings", 'mapped_category']].rename(
|
|
columns={"mapped_category": "WFT Findings"}
|
|
),
|
|
how="left",
|
|
left_on="Warmfront Finding",
|
|
right_on="non-intrusives: WFT Findings"
|
|
)
|
|
|
|
al.to_excel(
|
|
"/Users/khalimconn-kowlessar/Documents/hestia/Customers/Unitas/unitas_asset_list_for_analysis.xlsx",
|
|
index=False
|
|
)
|