class_docstr: Create a callable to select columns to be used with
  :class:`ColumnTransformer`.
  
  :func:`make_column_selector` can select columns based on datatype or the
  columns name with a regex. When using multiple selection criteria, **all**
  criteria must match for a column to be selected.
  
  Parameters
  ----------
  pattern : str, default=None
      Name of columns containing this regex pattern will be included. If
      None, column selection will not be selected based on pattern.
  
  dtype_include : column dtype or list of column dtypes, default=None
      A selection of dtypes to include. For more details, see
      :meth:`pandas.DataFrame.select_dtypes`.
  
  dtype_exclude : column dtype or list of column dtypes, default=None
      A selection of dtypes to exclude. For more details, see
      :meth:`pandas.DataFrame.select_dtypes`.
  
  Returns
  -------
  selector : callable
      Callable for column selection to be used by a
      :class:`ColumnTransformer`.
  
  See Also
  --------
  ColumnTransformer : Class that allows combining the
      outputs of multiple transformer objects used on column subsets
      of the data into a single feature space.
  
  Examples
  --------
  >>> from cuml.preprocessing import StandardScaler, OneHotEncoder
  >>> from cuml.compose import make_column_transformer
  >>> from cuml.compose import make_column_selector
  >>> import cupy as cp
  >>> import cudf  # doctest: +SKIP
  >>> X = cudf.DataFrame({'city': ['London', 'London', 'Paris', 'Sallisaw'],
  ...                    'rating': [5, 3, 4, 5]})  # doctest: +SKIP
  >>> ct = make_column_transformer(
  ...       (StandardScaler(),
  ...        make_column_selector(dtype_include=cp.number)),  # rating
  ...       (OneHotEncoder(),
  ...        make_column_selector(dtype_include=object)))  # city
  >>> ct.fit_transform(X)  # doctest: +SKIP
  array([[ 0.90453403,  1.        ,  0.        ,  0.        ],
         [-1.50755672,  1.        ,  0.        ,  0.        ],
         [-0.30151134,  0.        ,  1.        ,  0.        ],
         [ 0.90453403,  0.        ,  0.        ,  1.        ]])
class_docstr_tok: ["Create","a","callable","to","select","columns","to","be","used","with",":","class",":","`","ColumnTransformer","`",".",":","func",":","`","make_column_selector","`","can","select","columns","based","on","datatype","or","the","columns","name","with","a","regex",".","When","using","multiple","selection","criteria",",","*","*","all","*","*","criteria","must","match","for","a","column","to","be","selected",".","Parameters","--","--","--","--","--","pattern",":","str",",","default=None","Name","of","columns","containing","this","regex","pattern","will","be","included",".","If","None",",","column","selection","will","not","be","selected","based","on","pattern",".","dtype_include",":","column","dtype","or","list","of","column","dtypes",",","default=None","A","selection","of","dtypes","to","include",".","For","more","details",",","see",":","meth",":","`","pandas.DataFrame.select_dtypes","`",".","dtype_exclude",":","column","dtype","or","list","of","column","dtypes",",","default=None","A","selection","of","dtypes","to","exclude",".","For","more","details",",","see",":","meth",":","`","pandas.DataFrame.select_dtypes","`",".","Returns","--","--","--","-","selector",":","callable","Callable","for","column","selection","to","be","used","by","a",":","class",":","`","ColumnTransformer","`",".","See","Also","--","--","--","--","ColumnTransformer",":","Class","that","allows","combining","the","outputs","of","multiple","transformer","objects","used","on","column","subsets","of","the","data","into","a","single","feature","space",".","Examples","--","--","--","--",">",">",">","from","cuml.preprocessing","import","StandardScaler",",","OneHotEncoder",">",">",">","from","cuml.compose","import","make_column_transformer",">",">",">","from","cuml.compose","import","make_column_selector",">",">",">","import","cupy","as","cp",">",">",">","import","cudf","#","doctest",":","+SKIP",">",">",">","X","=","cudf.DataFrame","(","{","'city","'",":","[","'London","'",",","'London","'",",","'Paris","'",",","'Sallisaw","'","]",",","...","'rating","'",":","[","5",",","3",",","4",",","5","]","}",")","#","doctest",":","+SKIP",">",">",">","ct","=","make_column_transformer","(","...","(","StandardScaler","(",")",",","...","make_column_selector","(","dtype_include=cp.number",")",")",",","#","rating","...","(","OneHotEncoder","(",")",",","...","make_column_selector","(","dtype_include=object",")",")",")","#","city",">",">",">","ct.fit_transform","(","X",")","#","doctest",":","+SKIP","array","(","[","[","0.90453403",",","1.",",","0.",",","0",".","]",",","[","-1.50755672",",","1.",",","0.",",","0",".","]",",","[","-0.30151134",",","0.",",","1.",",","0",".","]",",","[","0.90453403",",","0.",",","0.",",","1",".","]","]",")"]
code: def __call__(self, df):
      if not hasattr(df, "iloc"):
          raise ValueError(
              "make_column_selector can only be applied to "
              "pandas dataframes"
          )
      df_row = df.iloc[:1]
      if (
          self.dtype_include is not None
          or self.dtype_exclude is not None
      ):
          df_row = df_row.select_dtypes(
              include=self.dtype_include, exclude=self.dtype_exclude
          )
      cols = df_row.columns
      if self.pattern is not None:
          cols = cols[cols.str.contains(self.pattern, regex=True)]
      return cols.tolist()
  
imports: from ..preprocessing import FunctionTransformer
  from ....thirdparty_adapters import check_array
  from ..utils.validation import check_is_fitted
  from ..utils.skl_dependencies import TransformerMixin, BaseComposition, BaseEstimator
  from cuml.internals import _deprecate_pos_args
  from cuml.internals.array_sparse import SparseCumlArray
  from cuml.internals.global_settings import _global_settings_data
  import cuml
  from itertools import chain
  from itertools import compress
  from joblib import Parallel
  import functools
  import timeit
  import numbers
  from cuml.internals.import_utils import has_sklearn
  from contextlib import contextmanager
  from collections import defaultdict
  import warnings
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 2 for calling the make_column_selector obj's underlying member method code with example usage: obj.__call__(df) and returns: cols