class_docstr: Selects features based on their type.
  
  This is practical when you want to apply different preprocessing steps to different kinds of
  features. For instance, a common usecase is to apply a `preprocessing.StandardScaler` to
  numeric features and a `preprocessing.OneHotEncoder` to categorical features.
  
  Parameters
  ----------
  types
      Python types which you want to select. Under the hood, the `isinstance` method will be used
      to check if a value is of a given type.
  
  Examples
  --------
  
  >>> import numbers
  >>> from river import compose
  >>> from river import linear_model
  >>> from river import preprocessing
  
  >>> num = compose.SelectType(numbers.Number) | preprocessing.StandardScaler()
  >>> cat = compose.SelectType(str) | preprocessing.OneHotEncoder()
  >>> model = (num + cat) | linear_model.LogisticRegression()
class_docstr_tok: ["Selects","features","based","on","their","type",".","This","is","practical","when","you","want","to","apply","different","preprocessing","steps","to","different","kinds","of","features",".","For","instance",",","a","common","usecase","is","to","apply","a","`","preprocessing.StandardScaler","`","to","numeric","features","and","a","`","preprocessing.OneHotEncoder","`","to","categorical","features",".","Parameters","--","--","--","--","--","types","Python","types","which","you","want","to","select",".","Under","the","hood",",","the","`","isinstance","`","method","will","be","used","to","check","if","a","value","is","of","a","given","type",".","Examples","--","--","--","--",">",">",">","import","numbers",">",">",">","from","river","import","compose",">",">",">","from","river","import","linear_model",">",">",">","from","river","import","preprocessing",">",">",">","num","=","compose.SelectType","(","numbers.Number",")","|","preprocessing.StandardScaler","(",")",">",">",">","cat","=","compose.SelectType","(","str",")","|","preprocessing.OneHotEncoder","(",")",">",">",">","model","=","(","num","+","cat",")","|","linear_model.LogisticRegression","(",")"]
code: def __repr__(self):
      if self.types:
          return (
              "Select (\n  "
              + "\n  ".join(map(str, sorted(self.types)))
              + "\n)"
          )
      return "Select ()"
  
imports: from __future__ import annotations
  from river import base
label_desc: Use image node_id 4 for calling the SelectType obj's underlying member method code with example usage: obj.__repr__() and returns: str, unknown