title: pandas.DatetimeIndex frequency is None and can't be set
body: <p>I created a DatetimeIndex from a "date" column:</p>
  
  <pre><code>sales.index = pd.DatetimeIndex(sales["date"])
  </code></pre>
  
  <p>Now the index looks as follows:</p>
  
  <pre><code>DatetimeIndex(['2003-01-02', '2003-01-03', '2003-01-04', '2003-01-06',
                     '2003-01-07', '2003-01-08', '2003-01-09', '2003-01-10',
                     '2003-01-11', '2003-01-13',
                     ...
                     '2016-07-22', '2016-07-23', '2016-07-24', '2016-07-25',
                     '2016-07-26', '2016-07-27', '2016-07-28', '2016-07-29',
                     '2016-07-30', '2016-07-31'],
                    dtype='datetime64[ns]', name='date', length=4393, freq=None)
  </code></pre>
  
  <p>As you see, the <code>freq</code> attribute is None. I suspect that errors down the road are caused by the missing <code>freq</code>. However, if I try to set the frequency explicitly:</p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-148-30857144de81&gt; in &lt;module&gt;()
        1 #### DEBUG
  ----&gt; 2 sales_train = disentangle(df_train)
        3 sales_holdout = disentangle(df_holdout)
        4 result = sarima_fit_predict(sales_train.loc[5002, 9990]["amount_sold"], sales_holdout.loc[5002, 9990]["amount_sold"])
  
  &lt;ipython-input-147-08b4c4ecdea3&gt; in disentangle(df_train)
        2     # transform sales table to disentangle sales time series
        3     sales = df_train[["date", "store_id", "article_id", "amount_sold"]]
  ----&gt; 4     sales.index = pd.DatetimeIndex(sales["date"], freq="d")
        5     sales = sales.pivot_table(index=["store_id", "article_id", "date"])
        6     return sales
  
  /usr/local/lib/python3.6/site-packages/pandas/util/_decorators.py in wrapper(*args, **kwargs)
       89                 else:
       90                     kwargs[new_arg_name] = new_arg_value
  ---&gt; 91             return func(*args, **kwargs)
       92         return wrapper
       93     return _deprecate_kwarg
  
  /usr/local/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py in __new__(cls, data, freq, start, end, periods, copy, name, tz, verify_integrity, normalize, closed, ambiguous, dtype, **kwargs)
      399                                          'dates does not conform to passed '
      400                                          'frequency {1}'
  --&gt; 401                                          .format(inferred, freq.freqstr))
      402 
      403         if freq_infer:
  
  ValueError: Inferred frequency None from passed dates does not conform to passed frequency D
  </code></pre>
  
  <p>So apparently a frequency has been inferred, but is stored neither in the <code>freq</code> nor <code>inferred_freq</code> attribute of the DatetimeIndex - both are None. Can someone clear up the confusion?</p>