title: Pandas Dataframe AttributeError: 'DataFrame' object has no attribute 'design_info'
body: <p>I am trying to use the <code>predict()</code> function of the <code>statsmodels.formula.api</code> OLS implementation. When I pass a new data frame to the function to get predicted values for an out-of-sample dataset <code>result.predict(newdf)</code> returns the following error: <code>'DataFrame' object has no attribute 'design_info'</code>. What does this mean and how do I fix it? The full traceback is:</p>
  
  <pre><code>    p = result.predict(newdf)
    File "C:\Python27\lib\site-packages\statsmodels\base\model.py", line 878, in predict
      exog = dmatrix(self.model.data.orig_exog.design_info.builder,
    File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 2088, in __getattr__
      (type(self).__name__, name))
  AttributeError: 'DataFrame' object has no attribute 'design_info'
  </code></pre>
  
  <p><strong>EDIT:</strong> Here is a reproducible example. The error appears to occur when I pickle and then unpickle the result object (which I need to do in my actual project):</p>
  
  <pre><code>import cPickle
  import pandas as pd
  import numpy as np
  import statsmodels.formula.api as sm
  
  df = pd.DataFrame({"A": [10,20,30,324,2353], "B": [20, 30, 10, 1, 2332], "C": [0, -30, 120, 11, 2]})
  
  result = sm.ols(formula="A ~ B + C", data=df).fit()
  print result.summary()
  
  test1 = result.predict(df) #works
  
  f_myfile = open('resultobject', "wb")
  cPickle.dump(result, f_myfile, 2)
  f_myfile.close()
  print("Result Object Saved")
  
  
  f_myfile = open('resultobject', "rb")
  model = cPickle.load(f_myfile)
  
  test2 = model.predict(df) #produces error
  </code></pre>