Skip to content

Instantly share code, notes, and snippets.

@itsderek23
Created June 5, 2019 20:58
Show Gist options
  • Save itsderek23/b7546dfec4b57a66477831c1fd3d0ffb to your computer and use it in GitHub Desktop.
Save itsderek23/b7546dfec4b57a66477831c1fd3d0ffb to your computer and use it in GitHub Desktop.
Hubspot Contacts by state with Pandas and PetalData
(contacts.df
.groupby("ip_state")
.agg({"created": "count"})
.sort_values(by="created",ascending=False)
).rename(columns={"created": "number_of_contacts"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment