sdv/metadata/table.py
def _get_transformers(self, dtypes):
        """Create the transformer instances needed to process the given dtypes.

        Args:
            dtypes (dict):
                mapping of field names and dtypes.

        Returns:
            dict:
                mapping of field names and transformer instances.
        """
        transformers = dict()
        for name, dtype in dtypes.items():
            field_metadata = self._fields_metadata.get(name, {})
            transformer_template = field_metadata.get('transformer')
            if transformer_template is None:
                transformer_template = self._dtype_transformers[np.dtype(dtype).kind]
                if transformer_template is None:
                    # Skip this dtype
                    continue

                field_metadata['transformer'] = transformer_template

            if isinstance(transformer_template, str):
                transformer_template = self._transformer_templates[transformer_template]

            if isinstance(transformer_template, type):
                transformer = transformer_template()
            else:
                transformer = copy.deepcopy(transformer_template)

            LOGGER.debug('Loading transformer %s for field %s',
                         transformer.__class__.__name__, name)
            transformers[name] = transformer

        return transformers
Create the transformer instances needed to process the given dtypes.

        Args:
            dtypes (dict):
                mapping of field names and dtypes.

        Returns:
            dict:
                mapping of field names and transformer instances.
        
Create the transformer instances needed to process the given dtypes.
Create the transformer instances needed to process the given dtypes .
def _get_transformers(self, dtypes):
        transformers = dict()
        for name, dtype in dtypes.items():
            field_metadata = self._fields_metadata.get(name, {})
            transformer_template = field_metadata.get('transformer')
            if transformer_template is None:
                transformer_template = self._dtype_transformers[np.dtype(dtype).kind]
                if transformer_template is None:
                    continue
                field_metadata['transformer'] = transformer_template
            if isinstance(transformer_template, str):
                transformer_template = self._transformer_templates[transformer_template]
            if isinstance(transformer_template, type):
                transformer = transformer_template()
            else:
                transformer = copy.deepcopy(transformer_template)
            LOGGER.debug('Loading transformer %s for field %s',
                         transformer.__class__.__name__, name)
            transformers[name] = transformer
        return transformers
def _get_transformers ( self , dtypes ) : transformers = dict ( ) for name , dtype in dtypes . items ( ) : field_metadata = self . _fields_metadata . get ( name , { } ) transformer_template = field_metadata . get ( 'transformer' ) if transformer_template is None : transformer_template = self . _dtype_transformers [ np . dtype ( dtype ) . kind ] if transformer_template is None : continue field_metadata [ 'transformer' ] = transformer_template if isinstance ( transformer_template , str ) : transformer_template = self . _transformer_templates [ transformer_template ] if isinstance ( transformer_template , type ) : transformer = transformer_template ( ) else : transformer = copy . deepcopy ( transformer_template ) LOGGER . debug ( 'Loading transformer %s for field %s' , transformer . __class__ . __name__ , name ) transformers [ name ] = transformer return transformers
Create the transformer instances needed to process the given dtypes.
Create the transformer instances needed to process the given dtypes .
"""Create the transformer instances needed to process the given dtypes.

        Args:
            dtypes (dict):
                mapping of field names and dtypes.

        Returns:
            dict:
                mapping of field names and transformer instances.
        """ # Skip this dtype
mapping of field names and transformer instances.
mapping of field names and transformer instances .
dict
self
dtypes
mapping of field names and dtypes.
mapping of field names and dtypes .