Oct-22-2023, 08:53 PM
I want to better understand the example you provided.. without providing more examples.. Why am i not able to get the calculations of the registers that are up? What portion of the logic should i focus on within the example portion of this "# Compute what % of registers are offline"
I tried adding a "Up" column and it complained about "Length mismatch: Expected axis has 3 elements, new values have 4 elements"
I tried to create a new set of logic and just renamed the variables and status to Up, but no luck.
I appreciate all the help, but id like to see if i can figure it out, but need a little push on where to focus in this logic:
I tried adding a "Up" column and it complained about "Length mismatch: Expected axis has 3 elements, new values have 4 elements"
I tried to create a new set of logic and just renamed the variables and status to Up, but no luck.
I appreciate all the help, but id like to see if i can figure it out, but need a little push on where to focus in this logic:
# Compute what % of registers are online by_store = statusResults.groupby("Store") statusUp = by_store["Status"] report = pd.concat([statusUp.size(), statusUp.sum()], axis=1).reset_index() report.columns = ["Store", "Register Count", "Up"] report["Up"] = report["Up"] / report["Register Count"] * 100 print("Register Status Report Up", report, sep="\n")