Allocated Score: Difference between revisions

Line 36:
winner_list = []
while len(winner_list) < W:
 
weighted_scores = ballots.multiply(ballot_weight, axis="index")
 
#Select winner
w = ballots.multiply(ballot_weight, axis="index")weighted_scores.sum().idxmax()
#Add winner to list
Line 44 ⟶ 46:
#Create lists for manipulation
cand_df = pd.concat([ballot_weight,ballotsweighted_scores[w]], axis=1).copy()
cand_df_sort = cand_df.sort_values(by=[w], ascending=False).copy()
763

edits