text: from sklearn.pipeline import Pipeline, FeatureUnion
  from sklearn.preprocessing import MinMaxScaler, OneHotEncoder
  
  from feature_selection import ColumnSelector
  from preprocessing import CustomLabelBinarizer as LabelBinarizer
  
  transformer = FeatureUnion(
      [
          # Numeric columns - minmax scaler.
          (
              'minmax_scaler',
              Pipeline(
                  [
                      (
                          'selector',
                          ColumnSelector(
                              [
                                  'account_length',
                                  'number_vmail_messages',
                                  'number_customer_service_calls',
  
                                  'total_day_calls',
                                  'total_eve_calls',
                                  'total_night_calls',
                                  'total_intl_calls',
  
                                  'total_day_minutes',
                                  'total_eve_minutes',
                                  'total_night_minutes',
                                  'total_intl_minutes',
  
                                  'total_day_charge',
                                  'total_eve_charge',
                                  'total_night_charge',
                                  'total_intl_charge',
                              ]
                          )
                      ),
                      ('scaler', MinMaxScaler()),
                  ]
              )
          ),
  
          # Binary columns - label binarizer.
          (
              'label_binarizer_international_plan',
              Pipeline(
                  [
                      ('selector', ColumnSelector('international_plan')),
                      ('binarizer', LabelBinarizer()),
                  ]
              )
          ),
          (
              'label_binarizer_voice_mail_plan',
              Pipeline(
                  [
                      ('selector', ColumnSelector('voice_mail_plan')),
                      ('binarizer', LabelBinarizer()),
                  ]
              )
          ),
  
          # Categorical columns: dummy encoder.
          (
              'dummy_encoder',
              Pipeline(
                  [
                      (
                          'selector',
                          ColumnSelector(
                              [
                                  'area_code',
                                  'state',
                              ]
                          )
                      ),
                      ('encoder', OneHotEncoder(dtype=int)),
                  ]
              )
          )
      ]
  )
  