sdv/metadata/table.py
def from_dict(cls, metadata_dict, dtype_transformers=None):
        """Load a Table from a metadata dict.

        Args:
            metadata_dict (dict):
                Dict metadata to load.
            dtype_transformers (dict):
                If passed, set the dtype_transformers on the new instance.
        """
        metadata_dict = copy.deepcopy(metadata_dict)
        fields = metadata_dict['fields'] or {}
        instance = cls(
            name=metadata_dict.get('name'),
            field_names=set(fields.keys()),
            field_types=fields,
            constraints=metadata_dict.get('constraints') or [],
            model_kwargs=metadata_dict.get('model_kwargs') or {},
            primary_key=metadata_dict.get('primary_key'),
            sequence_index=metadata_dict.get('sequence_index'),
            entity_columns=metadata_dict.get('entity_columns') or [],
            context_columns=metadata_dict.get('context_columns') or [],
            dtype_transformers=dtype_transformers,
            min_value=metadata_dict.get('min_value', 'auto'),
            max_value=metadata_dict.get('max_value', 'auto'),
            rounding=metadata_dict.get('rounding', 'auto'),
        )
        instance._fields_metadata = fields
        return instance
Load a Table from a metadata dict.

        Args:
            metadata_dict (dict):
                Dict metadata to load.
            dtype_transformers (dict):
                If passed, set the dtype_transformers on the new instance.
        
Load a Table from a metadata dict.
Load a Table from a metadata dict .
def from_dict(cls, metadata_dict, dtype_transformers=None):
        metadata_dict = copy.deepcopy(metadata_dict)
        fields = metadata_dict['fields'] or {}
        instance = cls(
            name=metadata_dict.get('name'),
            field_names=set(fields.keys()),
            field_types=fields,
            constraints=metadata_dict.get('constraints') or [],
            model_kwargs=metadata_dict.get('model_kwargs') or {},
            primary_key=metadata_dict.get('primary_key'),
            sequence_index=metadata_dict.get('sequence_index'),
            entity_columns=metadata_dict.get('entity_columns') or [],
            context_columns=metadata_dict.get('context_columns') or [],
            dtype_transformers=dtype_transformers,
            min_value=metadata_dict.get('min_value', 'auto'),
            max_value=metadata_dict.get('max_value', 'auto'),
            rounding=metadata_dict.get('rounding', 'auto'),
        )
        instance._fields_metadata = fields
        return instance
def from_dict ( cls , metadata_dict , dtype_transformers = None ) : metadata_dict = copy . deepcopy ( metadata_dict ) fields = metadata_dict [ 'fields' ] or { } instance = cls ( name = metadata_dict . get ( 'name' ) , field_names = set ( fields . keys ( ) ) , field_types = fields , constraints = metadata_dict . get ( 'constraints' ) or [ ] , model_kwargs = metadata_dict . get ( 'model_kwargs' ) or { } , primary_key = metadata_dict . get ( 'primary_key' ) , sequence_index = metadata_dict . get ( 'sequence_index' ) , entity_columns = metadata_dict . get ( 'entity_columns' ) or [ ] , context_columns = metadata_dict . get ( 'context_columns' ) or [ ] , dtype_transformers = dtype_transformers , min_value = metadata_dict . get ( 'min_value' , 'auto' ) , max_value = metadata_dict . get ( 'max_value' , 'auto' ) , rounding = metadata_dict . get ( 'rounding' , 'auto' ) , ) instance . _fields_metadata = fields return instance
Load a Table from a metadata dict.
Load a Table from a metadata dict .
"""Load a Table from a metadata dict.

        Args:
            metadata_dict (dict):
                Dict metadata to load.
            dtype_transformers (dict):
                If passed, set the dtype_transformers on the new instance.
        """
cls
metadata_dict
Dict metadata to load.
Dict metadata to load .
dtype_transformers
If passed, set the dtype_transformers on the new instance.
If passed set the dtype_transformers on the new instance .