Skip to content

Instantly share code, notes, and snippets.

@chrisroat
Created January 7, 2023 21:48
Show Gist options
  • Save chrisroat/ae3f98e0ae33805dca92445ffd217784 to your computer and use it in GitHub Desktop.
Save chrisroat/ae3f98e0ae33805dca92445ffd217784 to your computer and use it in GitHub Desktop.
test42
df_contest = df_raw.loc[idx[:, "City of Los Altos, Council Member (Vote For=3)"], :]
df_contest.index = df_contest.index.droplevel("contest")
df_cvr = df_contest.astype(int).unstack(fill_value=0)
df_cvr.columns = df_cvr.columns.droplevel(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment