Skip to content

Instantly share code, notes, and snippets.

@fabsta
Created January 27, 2020 14:28
Show Gist options
  • Save fabsta/71bf2ec5cba50fedf7a0d5516e4f718a to your computer and use it in GitHub Desktop.
Save fabsta/71bf2ec5cba50fedf7a0d5516e4f718a to your computer and use it in GitHub Desktop.
[pandas columns to dict] converts two columns to a dictionary #python #pandas
area_dict = dict(zip(lakes.area, lakes.count))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment