Skip to content

Instantly share code, notes, and snippets.

@dpbac
Created June 22, 2021 17:17
Show Gist options
  • Select an option

  • Save dpbac/6b1629d500a3fd65621e10040f44d695 to your computer and use it in GitHub Desktop.

Select an option

Save dpbac/6b1629d500a3fd65621e10040f44d695 to your computer and use it in GitHub Desktop.
import statsmodels.api as sm
decomposition = sm.tsa.seasonal_decompose(diet['diet: (United States)'],
model = 'multiplicative',
period=53 #52 to 53 weeks in a year
)
fig = decomposition.plot()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment