class_docstr: The `PatsyTransformer` offers a method to select the right columns from a dataframe as well as a DSL for
  transformations.
  
  It is inspired from R formulas. This is can be useful as a first step in the pipeline.
  
  Parameters
  ----------
  formula : str
      A patsy-compatible formula.
  return_type : Literal["matrix", "dataframe"], default="matrix"
      Either "matrix" or "dataframe", passed on to patsy.
  
  Attributes
  ----------
  design_info_ : [patsy.DesignInfo](https://patsy.readthedocs.io/en/latest/API-reference.html#patsy.DesignInfo)
      A DesignInfo object holds metadata about a design matrix.
code: def __init__(self, formula, return_type="matrix"):
      self.formula = formula
      self.return_type = return_type
  
file_path: scikit-lego/sklego/preprocessing/patsytransformer.py
imports: import numpy
  from deprecated import deprecated
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 1 to create a new PatsyTransformer object from inherited base classes: TransformerMixin, BaseEstimator with example: obj = PatsyTransformer(formula, return_type)