title: name 'DataFrameSelector' is not defined
body: <p>I am currently reading the <em>"Hands-On Machine Learning with Scikit-Learn &amp; TensorFlow"</em>. I get an error when I am trying to recreate the Transformation Pipelines code.  How can I fix this?</p>
  
  <h3>Code:</h3>
  
  <pre><code>from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  
  num_pipeline = Pipeline([('imputer', Imputer(strategy = "median")),
                          ('attribs_adder', CombinedAttributesAdder()),
                          ('std_scaler', StandardScaler()),
                          ])
  
  housing_num_tr = num_pipeline.fit_transform(housing_num)
  
  from sklearn.pipeline import FeatureUnion
  
  num_attribs = list(housing_num)
  cat_attribs = ["ocean_proximity"]
  
  num_pipeline = Pipeline([
                           ('selector', DataFrameSelector(num_attribs)),
                           ('imputer', Imputer(strategy = "median")),
                           ('attribs_adder', CombinedAttributesAdder()),
                           ('std_scaler', StandardScaler()),
                          ])
  
  cat_pipeline = Pipeline([('selector', DataFrameSelector(cat_attribs)), 
                           ('label_binarizer', LabelBinarizer()),
                          ])
  
  full_pipeline = FeatureUnion(transformer_list = [("num_pipeline", num_pipeline), 
                                                   ("cat_pipeline", cat_pipeline),
                                                  ])
  
  # And we can now run the whole pipeline simply:
  
  housing_prepared = full_pipeline.fit_transform(housing)
  housing_prepared
  </code></pre>
  
  <h3>Error:</h3>
  
  <pre><code>---------------------------------------------------------------------------
  NameError                                 Traceback (most recent call last)
  &lt;ipython-input-350-3a4a39e5bc1c&gt; in &lt;module&gt;()
       43 
       44 num_pipeline = Pipeline([
  ---&gt; 45                          ('selector', DataFrameSelector(num_attribs)),
       46                          ('imputer', Imputer(strategy = "median")),
       47                          ('attribs_adder', CombinedAttributesAdder()),
  
  NameError: name 'DataFrameSelector' is not defined
  </code></pre>