Skip to content

Instantly share code, notes, and snippets.

@itsderek23
Last active April 12, 2019 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsderek23/fe1024d5939b44442d93bff9b71cd6a8 to your computer and use it in GitHub Desktop.
Save itsderek23/fe1024d5939b44442d93bff9b71cd6a8 to your computer and use it in GitHub Desktop.
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
grouped = df_users.groupby(pd.Grouper(key='signed_up_at',freq='W')).agg({"email": 'count'})
plt.figure(figsize=(12,8))
plt.plot(grouped.index.values, grouped.email.values)
plt.xlabel('Week', fontsize=12)
plt.ylabel('Users', fontsize=12)
plt.title("User Signups by Week")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment