import pandas as pd

df = pd.read_excel(
    "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Cottons/Cottons Asset List.xlsx"
)

# split up the address on commas. First section is address1, last seciton is postcode
df["address1"] = df["Property Address"].apply(lambda x: x.split(",")[0].strip())
df["postcode"] = df["Property Address"].apply(lambda x: x.split(",")[-1].strip())

# Re-save
df.to_excel(
    "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Cottons/Cottons Asset List.xlsx",
    index=False,
)
