Skip to content

Instantly share code, notes, and snippets.

@ThonyPrice
Created April 25, 2019 18:22
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 ThonyPrice/54c858c2088dcb9ee35ffdb599869037 to your computer and use it in GitHub Desktop.
Save ThonyPrice/54c858c2088dcb9ee35ffdb599869037 to your computer and use it in GitHub Desktop.
Medium - Get started analysing your CGM data
z = df.copy(deep=True)
z = z.resample('D').mean()
z['date'] = z.index.date
z.insert(z.shape[1], 'day', z.index.value_counts().sort_index().cumsum())
plt.figure(figsize=(16, 6))
fs = sns.regplot(
data = z,
x ='day',
y ='glucose',
ci = 95,
color = '#13ac5f')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment