title: seasonal_decompose raises error: TypeError: PeriodIndex given. Check the `freq` attribute instead of using infer_freq
body: <p>I'm trying to run a basic seasonal_decompose on the oft-used airline passengers data set, which begins with these rows:</p>
  
  <pre><code>Month
  1949-02    4.770685
  1949-03    4.882802
  1949-04    4.859812
  1949-05    4.795791
  1949-06    4.905275
  1949-07    4.997212
  1949-08    4.997212
  1949-09    4.912655
  1949-10    4.779123
  1949-11    4.644391
  1949-12    4.770685
  1950-01    4.744932
  1950-02    4.836282
  1950-03    4.948760
  1950-04    4.905275
  1950-05    4.828314
  1950-06    5.003946
  1950-07    5.135798
  1950-08    5.135798
  Freq: M, Name: Passengers, dtype: float64
  </code></pre>
  
  <p>My index type is:</p>
  
  <pre><code>pandas.tseries.period.PeriodIndex
  </code></pre>
  
  <p>I try to run some very simple code:</p>
  
  <pre><code>from statsmodels.tsa.seasonal import seasonal_decompose
  log_passengers.interpolate(inplace = True)
  decomposition = seasonal_decompose(log_passengers)
  </code></pre>
  
  <p>Here is the full output of the error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-113-bf122d457673&gt; in &lt;module&gt;()
        1 from statsmodels.tsa.seasonal import seasonal_decompose
        2 log_passengers.interpolate(inplace = True)
  ----&gt; 3 decomposition = seasonal_decompose(log_passengers)
  
  /Users/ann/anaconda/lib/python3.5/site-packages/statsmodels/tsa/seasonal.py in seasonal_decompose(x, model, filt, freq)
       56     statsmodels.tsa.filters.convolution_filter
       57     """
  ---&gt; 58     _pandas_wrapper, pfreq = _maybe_get_pandas_wrapper_freq(x)
       59     x = np.asanyarray(x).squeeze()
       60     nobs = len(x)
  
  /Users/ann/anaconda/lib/python3.5/site-packages/statsmodels/tsa/filters/_utils.py in _maybe_get_pandas_wrapper_freq(X, trim)
       44         index = X.index
       45         func = _get_pandas_wrapper(X, trim)
  ---&gt; 46         freq = index.inferred_freq
       47         return func, freq
       48     else:
  
  pandas/src/properties.pyx in pandas.lib.cache_readonly.__get__ (pandas/lib.c:44097)()
  
  /Users/ann/anaconda/lib/python3.5/site-packages/pandas/tseries/base.py in inferred_freq(self)
      233         """
      234         try:
  --&gt; 235             return frequencies.infer_freq(self)
      236         except ValueError:
      237             return None
  
  /Users/ann/anaconda/lib/python3.5/site-packages/pandas/tseries/frequencies.py in infer_freq(index, warn)
      854 
      855     if com.is_period_arraylike(index):
  --&gt; 856         raise TypeError("PeriodIndex given. Check the `freq` attribute "
      857                         "instead of using infer_freq.")
      858     elif isinstance(index, pd.TimedeltaIndex):
  
  TypeError: PeriodIndex given. Check the `freq` attribute instead of using infer_freq.
  </code></pre>
  
  <p>Here's what I've tried:</p>
  
  <ul>
  <li>Use <code>decomposition = seasonal_decompose(log_passengers, infer_freq = True)</code> which produces the error:  <code>TypeError: seasonal_decompose() got an unexpected keyword argument 'infer_freq'</code></li>
  <li>Use <code>decomposition = seasonal_decompose(log_passengers, freq = 'M')</code> which results in the error: <code>TypeError: PeriodIndex given. Check the</code>freq<code>attribute instead of using infer_freq.</code></li>
  <li>I also verified that each period index in my index of period indices has the same frequency with the list of code: <code>set([x.freq for x in log_passengers.index])</code> which indeed produced a set of only one frequency: <code>{&lt;MonthEnd&gt;}</code></li>
  </ul>
  
  <p>I see some talk of this on various Github issues (<a href="https://github.com/pydata/pandas/issues/6771" rel="noreferrer">https://github.com/pydata/pandas/issues/6771</a>) , but none of what's discussed seems to help. <strong>Any suggestions on how to troubleshoot this or what I'm doing wrong in this simple seasona_decompose</strong>?</p>