title: error : "DataFrame constructor not properly called!"
body: <p>i am using this function to create two-way interactions for all features (using sickitLeran function PolynomialFeatures ), but i got this error : "DataFrame constructor not properly called!" 
  my code is :</p>
  
  <pre><code>def add_interactions(DataFrame):
  
      combos=list(combinations(list(DataFrame.columns), 2))
      colnames=list(DataFrame.columns) + ['-'.join(x) for x in combos]
  
      poly = PolynomialFeatures(degree=2)
      DataF = poly.fit(DataFrame)
      print(DataF)
      DataF.columns=colnames
      DataFrame = pd.DataFrame(DataF)
  
      noint_indicies=[i for i, x in enumerate (list((DataFrame == 0).all())) if x]
      DataFrame = DataFrame.drop(DataFrame.columns[noint_indicies], axis=1)
       return DataFrame
  
  T = add_interactions(X)
  
     the traceback of the error: 
  
     ---------------------------------------------------------------------------
     ValueError                                Traceback (most recent call last)
     &lt;ipython-input-61-790b132c4f1d&gt; in &lt;module&gt;()
      1 poly = PolynomialFeatures(degree=2,interaction_only=True, include_bias=False)
     2 DataFrame = poly.fit(X)
      ----&gt; 3 DataFrame = pd.DataFrame(data = DataFrame)
      4 print(DataFrame.head(3))
  
      ~\Anaconda3\lib\site-packages\pandas\core\frame.py in __init__(self, 
       data, index, columns, dtype, copy)
       402                                          dtype=values.dtype, 
       copy=False)
       403             else:
      --&gt; 404                 raise ValueError('DataFrame constructor not 
      properly called!')
      405 
      406         NDFrame.__init__(self, mgr, fastpath=True)
  
      ValueError: DataFrame constructor not properly called!
  </code></pre>