Change plot_summary_stats to have Frequency on y-axis and always print candidates in order they were inputted.
Change PreferenceProfile data frame to have a Percent column. Removed Voter Share column, as this information can be read from the weight and the total weight. Update _sum_row method accordingly.
Change PreferenceProfilehead and tail methods to have an optional sort_by_weight parameter. Also automatically condenses ballots.
Add received_votes parameter to get_candidates method of PreferenceProfile. Defaults to True; if True, only return candidate that received votes. If False (and self.candidates not None), return self.candidates.
plot_summary_stats
to have Frequency on y-axis and always print candidates in order they were inputted.PreferenceProfile
data frame to have a Percent column. Removed Voter Share column, as this information can be read from the weight and the total weight. Update_sum_row
method accordingly.PreferenceProfile
head
andtail
methods to have an optionalsort_by_weight
parameter. Also automatically condenses ballots.received_votes
parameter toget_candidates
method ofPreferenceProfile
. Defaults to True; if True, only return candidate that received votes. If False (andself.candidates not None
), returnself.candidates
.