Skip to content

Instantly share code, notes, and snippets.

@robsannaa
Created November 14, 2019 19:45
Show Gist options
  • Save robsannaa/568431de427ca63f577d5387ea260df9 to your computer and use it in GitHub Desktop.
Save robsannaa/568431de427ca63f577d5387ea260df9 to your computer and use it in GitHub Desktop.
df_clean = convert_dates(df_clean, 'Created at', replace_index=True)
df_clean = df_clean.resample('d').sum()
df_clean['ds'] = df_clean.index.values
df_clean.index = range(0, len(df_clean))
df_clean['ds'] = df_clean.ds.dt.date
df_clean = df_clean.rename(columns={'Total':'y'})
df_clean = df_clean[['ds', 'y']]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment