Created
June 5, 2019 20:40
-
-
Save itsderek23/19ec8e267f68fa9cb09a63b6b421f113 to your computer and use it in GitHub Desktop.
Plot of Hubspot Total Contacts over Time w/Pandas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib | |
import matplotlib.pyplot as plt | |
grouped = contacts.df.groupby(pd.Grouper(key="created",freq="M")).agg({"created": "count"}) | |
grouped.rename(columns={"created": "new_contacts"},inplace=True) | |
grouped.cumsum().plot(title="Total Hubspot Contacts") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment