Skip to content

Instantly share code, notes, and snippets.

@panicpotatoe
Last active March 12, 2019 03:03
Show Gist options
  • Select an option

  • Save panicpotatoe/e5ffab59965c0f43a6951d8076ff22a3 to your computer and use it in GitHub Desktop.

Select an option

Save panicpotatoe/e5ffab59965c0f43a6951d8076ff22a3 to your computer and use it in GitHub Desktop.
# Now convert into a DataFrame, Assign the column names and row names
expected = pd.DataFrame(expected)
expected.columns = ["democrat", "independent", "republican"]
expected.index = ["asian", "black", "hispanic", "other", "white"]
# You can check the data of expected table by calling it
expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment