@staticmethod
def calculate_winners(df, voteshare_col):
    """Assumes df has `ons_id` and `party` columns."""
    return df.sort_values(voteshare_col, ascending=False).groupby('ons_id'
        ).head(1)[['ons_id', 'party']].set_index('ons_id').party
