title: CalibratedClassifierCV doesn't work with Pandas DataFrame for Pipeline?
body: <p>I built a classification model using sklearn Pipeline. Now I want to run CalibratedClassifierCV to calibrate the probability prediction.</p>
  <pre><code>model = pickle.load(open('model.pkl', 'rb'))
  train = pd.read_csv('new_train.csv')
  features = ['BVW_2C', 'PHIT_2C', 'SW_2C', 'VCARB_2C', 'VCLAY_2C', 'VKER_2C', 'VPYR_2C', 'VSAND_2C', 'GOLD_DTC', 'GOLD_DTS', 'GOLD_GR', 'GOLD_NPHI', 'GOLD_PEF', 'GOLD_RDEEI', 'GOLD_RHOB', 'HETI_NORM_GR']
  clf_iso = CalibratedClassifierCV(model, cv=3, method='isotonic')
  clf_iso.fit(train[features], train[['trouble']])
  </code></pre>
  <p>Pretrained model was loaded from a file, it basically composed of a scaler and a gradient boost classifier. If I print out the model, it looks like this:</p>
  <pre><code>Pipeline(steps=[('preproc',
                   ColumnTransformer(transformers=[('num',
                                                    Pipeline(steps=[('scaler',
                                                                     StandardScaler())]),
                                                    ['BVW_2C', 'PHIT_2C', 'SW_2C',
                                                     'VCARB_2C', 'VCLAY_2C',
                                                     'VKER_2C', 'VPYR_2C',
                                                     'VSAND_2C', 'GOLD_DTC',
                                                     'GOLD_DTS', 'GOLD_GR',
                                                     'GOLD_NPHI', 'GOLD_PEF',
                                                     'GOLD_RDEEI', 'GOLD_RHOB',
                                                     'HETI_NORM_GR'])])),
                  ('clf',
                   LGBMClassifier(max_depth=30, n_estimators=300,
                                  num_leaves=200))])
  </code></pre>
  <p>For some reason I got the following error while executing <code>clf_iso.fit(train[features], train[['trouble']])</code>.</p>
  <pre><code>AttributeError                            Traceback (most recent call last)
  /p/ressim02/analytics/AICOE/jiaod/geonet-ml/geo-env/lib/python3.7/site-packages/sklearn/utils/__init__.py in _get_column_indices(X, key)
      424         try:
  --&gt; 425             all_columns = X.columns
      426         except AttributeError:
  
  AttributeError: 'numpy.ndarray' object has no attribute 'columns'
  
  During handling of the above exception, another exception occurred:
  
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-49-cfae22cb4b89&gt; in &lt;module&gt;
        1 clf_iso = CalibratedClassifierCV(model, cv=3, method='isotonic')
  ----&gt; 2 clf_iso.fit(train[features], train[['trouble']])
  </code></pre>
  <p><code>train[features]</code> is clearly a Pandas Dataframe (confirmed by <code>type(train[features])</code>). Why does it still see it as numpy array. If I just retrain the same data again with loaded model <code>model.fit(train[features], train[['trouble']])</code>, it works without any issue. Why doesn't it work with CalibratedClassifierCV?</p>
  <p><strong>EDIT</strong></p>
  <p>Looks like a known issue <a href="https://www.gitmemory.com/issue/scikit-learn/scikit-learn/8710/499113383" rel="nofollow noreferrer">link</a> (<a href="https://github.com/scikit-learn/scikit-learn/issues/8710" rel="nofollow noreferrer">github issue #8710</a>)</p>