Skip to content

Chosing the correct rows when downloading past elections #24

Description

@pforero

The format of past elections from MIR seems to vary. The 1977 election has an additional row with totals at the bottom, while the 2016 election does not. Currently to avoid downloading different columns (that need to be treated differently) we impose that the number of rows to be parsed are 53. This works because for all past elections there are only 52 voting regions. If the number were to change, this would no longer work.

Trying to use dropna to get rid of the extra rows at the bottom for total does not work, as it deletes as well the rows with the party's initials.

Ideally there needs to be a way of parsing these excels which is more robust to future changes in the number of regions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions