title: decompose() for time series: ValueError: You must specify a period or x must be a pandas object with a DatetimeIndex with a freq not set to None
body: <p>I have some problems executing an <code>additive</code> model right. I have the following data frame:</p>
  <p><img src="https://i.stack.imgur.com/NEhGF.png" alt="1" /></p>
  <p>And when I run this code:</p>
  <pre class="lang-py prettyprint-override"><code>import statsmodels as sm
  import statsmodels.api as sm
  decomposition = sm.tsa.seasonal_decompose(df, model = 'additive')
  fig = decomposition.plot()
  matplotlib.rcParams['figure.figsize'] = [9.0,5.0]
  </code></pre>
  <p>I got that message:</p>
  <blockquote>
  <p>ValueError: You must specify a period or x must be a pandas object with a &gt;DatetimeIndex with a freq not set to None</p>
  </blockquote>
  <p>What should I do in order to get that example:
  <img src="https://i.stack.imgur.com/bkbFK.png" alt="2" /></p>
  <p>The screen above I took from this <a href="https://towardsdatascience.com/analyzing-time-series-data-in-pandas-be3887fdd621" rel="noreferrer">place</a></p>