Line 302 of fca.py
W3sum_frame = cost_df[["origin", "W3"]].groupby('origin').sum().rename(columns = {"W3" : "W3sum"}).reset_index()
I believe should be
W3sum_frame = cost_df[[cost_origin, "W3"]].groupby(cost_origin).sum().rename(columns = {"W3" : "W3sum"}).reset_index()
The current one hard-codes the name of cost origin which is inconsistent with code and causes an issue when the demand and supply indices are not equal.
Line 302 of fca.py
W3sum_frame = cost_df[["origin", "W3"]].groupby('origin').sum().rename(columns = {"W3" : "W3sum"}).reset_index()
I believe should beW3sum_frame = cost_df[[cost_origin, "W3"]].groupby(cost_origin).sum().rename(columns = {"W3" : "W3sum"}).reset_index()
The current one hard-codes the name of cost origin which is inconsistent with code and causes an issue when the demand and supply indices are not equal.