title: Sklearn pipeline not fitted after .fit has been called?
body: <p>I have a simple pipeline like this</p>
  <pre><code>pl = Pipeline(steps=[(&quot;preprocessor&quot;, ColumnTransformer(
                        transformers=[
                       ('num', Pipeline(steps=[('StandardScaler', StandardScaler())]), selector(dtype_exclude=&quot;category&quot;)),
                       ('cat', Pipeline(steps=[('onehot', OneHotEncoder( sparse = False, handle_unknown='ignore' ))]), selector(dtype_include=&quot;category&quot;))])),
                 ('LR', LogisticRegression(max_iter = 1000, intercept_scaling = 1))])
  </code></pre>
  <p>I then call pl.fit on my training data, but when I try to check the onehot encoder to get variable names I keep getting an error message that it hasnt been fitted yet</p>
  <pre><code>pl.fit(X_train.drop(['ID'],axis = 1), y_train)
  pl.named_steps['preprocessor'].transformers[1][1].named_steps['onehot'].get_feature_names()
  
  &gt;&gt; This OneHotEncoder instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator.
  </code></pre>
  <p>And checking confirms it has not been fitted. What am I missing?</p>
  <pre><code>from sklearn.utils.validation import check_is_fitted
  
  try:
      check_is_fitted(pl)
  except:
      print('not fitted')
  
  &gt;&gt; not fitted
  </code></pre>