I'm working on the Brazilian local elections database and now I need to drop rows that contain more than one candidate ELECTED by Municipality. My data looks like:
>df
Candidate Municipality Situation
Rose A ELECTED
Mark A NON-ELECTED
Linda A ELECTED
Jhon A NON-ELECTED
James B ELECTED
Phillip B NON-ELECTED
Bruce B NON-ELECTED
In the case illustrated above, the elected candidate in municipality A had his mandate revoked, therefore, we had another election.
So, I'm looking for a routine that automatically drops any case like this in my data. The output I desire in this case is like:
>df
Candidate Municipality Situation
James B ELECTED
Phillip B NON-ELECTED
Bruce B NON-ELECTED
Regards,